mystuff = [1, 2, 'Foo', 34, 42, 'Ni', 12, 14, 'Blue']
fmt = '{0} {1} {2}'
num_terms = sum(1 for x in Formatter().parse(fmt))
for x in zip(*([iter(mystuff)] * num_terms)):
    pass
Итерация строки формата по списку