flatten a level one list

Michael Spencer mahs at telcopartners.com
Fri Jan 13 12:07:42 EST 2006


> Michael Spencer wrote:
>>                  result[ix::count] = input + [pad]*(maxlen-lengths[ix])

Peter Otten rewrote:
>          result[ix:len(input)*count:count] = input

Quite so. What was I thinking?


Michael




More information about the Python-list mailing list