[Tutor] Remove a dictionary entry
M. 427
427 at free.fr
Fri Sep 17 15:08:06 CEST 2010
Hello,
(I am very new to python)
I built a dictionary d={} of lists similar to this :
d = {
'a': ['apricot', 'apple'],
'b': ['beach', 'bear', 'bottle'],
'c': ['cold', 'cook', 'coleslaw'],
'd': ['deep'],
'e': ['expression', 'elephant']
}
Now i want to go through this dictionary and remove all rows containing
only one entry. How should I do that?
Question 2 : where should I have found this answer myself? (apart from
here)
Thank you for your help.
Mr. 427
More information about the Tutor
mailing list