Sequence-spreading

gzeljko gzeljko at sezampro.yu
Tue Mar 20 12:44:29 EST 2001


Alex Martelli <aleaxit at yahoo.com> wrote in message
> offsets = [ [] for i in range(pm) ]
> for i in range(len(arg)):
>     offsets[i%pm].append(i)
>
>
> Alex
>

Old syntax yet works:

offsets = [[]]*pm

ly-y'rs-gzeljko





More information about the Python-list mailing list