[Tutor] making list into a dictionary

kumar s ps_python at yahoo.com
Fri Nov 5 05:18:45 CET 2004


Dear group, 
 I want to convert 2 lists into a dictionary object. 

Can I do that using list comprehension or by any other
method:

a = ['apple', 'carrot', 'egg', 'cicken']
b = ['fruit', 'vegie', 'poultry', 'meat']

c = {}

I want to create:
c = {'fruit':'apple',
'vegie':'carrot',
'poultry':'egg',
'mean':'chicken'}

Could any one help, please. 

Thanks
Kumar.


		
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 



More information about the Tutor mailing list