Splitting string into dictionary

George Sakkis gsakkis at rutgers.edu
Fri Jul 1 01:45:08 EDT 2005


"David Pratt" wrote:

> Wow Robert that is incredible python magic!  I am trying to figure out
> what this is doing since my attempts were regex and some long string
> splitting and collection.
>
> Ok. So it is a list comprehension and then collection.  What is zip
> doing in the second line?
>
> Regards
> David

Why don't you fire up the python interpreter and type
>>> help(zip)
>>> zip([1,2,3],"abc")


Teaching-a-man-to-fish-instead-of-giving-him-a-fish'ly yrs,

George




More information about the Python-list mailing list