Arnaud Delobelle schrieb: > > How about this? > >>>> from itertools import * >>>> def fixlen(iterable, len, item=None): > ... return islice(chain(iterable, repeat(item)), len) > ... >>>> list(fixlen([1, 2, 3], 5)) > [1, 2, 3, None, None] > I like this. Maybe an addition to itertools? +1