[Tutor] priting keys and its values of a dictionary in a single row
Srinivas Iyyer
srini_iyyer_bio at yahoo.com
Fri Apr 27 23:10:16 CEST 2007
Dear group,
I have a dictionary (huge) and there are 19K keys for
this dictionary. The values for the could be a max 19K
again.
simpler version of it:
mydict=
{'a':['apple','ant','anchor','arrow'],'b':['ball','baby',boy','bus'],'c':['cat','call']}
in a different list, i have keys:
mlist = ['a','b','c']
I want to print in the following way:
a,apple,ant,anchor,arrow
b,ball,baby,boy,bus
c,cat call
I cannot think of a simple way to do that (may be a
mental block). could any one help me please.
Thanks
srini
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Tutor
mailing list