Printing lists in columns

Miles semanticist at gmail.com
Tue Sep 4 14:05:32 EDT 2007


On 9/4/07, Hrvoje Niksic wrote:
> Python isn't too happy about adding individual keyword arguments after
> an explicit argument tuple.  Try this instead:
>
> for row in izip_longest(*d, **dict(fillvalue='*')):
>      print ', '.join(row)

Or simply:

for row in izip_longest(fillvalue='*', *d):
    print ', '.join(row)

-Miles



More information about the Python-list mailing list