[Tutor] Dynamically assign variable names to tuple objects

Sean Carolan scarolan at gmail.com
Tue Mar 1 23:06:33 CET 2011

> Another way is:
> zip(*map(open, myfiles))

>> Then your loop looks like:
>> for i in zip([ cleanedup(filename) for filename in myfiles ])

Thanks, Steven!  I knew there was a way to do this with just a few
lines.  I will read up some more on list expansion and the map

More information about the Tutor mailing list