Newbie Dictionary from tuples

Felipe Almeida Lessa felipe.lessa at gmail.com
Mon Mar 27 22:03:01 CEST 2006


Em Seg, 2006-03-27 às 14:26 -0500, Tommy Grav escreveu:
> I have two tuples: keys and subjects. How do I construct a dictionary 
> using these two tuples?

dict(zip(keys, subjects))

-- 
Felipe.




More information about the Python-list mailing list