[Tutor] dictionary question

Eric Walker ewalker at micron.com
Fri Nov 11 22:39:32 CET 2005


All,
I have a dictionary say:
d = {'first':[]}
I am going through another list and depending on whats going on,
I want to add to the empty list. I have tried the following to noavail.

d['first'] = d['first'].append("string")

I would think this would result in the dictionary key first's empty list  to 
become ["string"].  can anyone help clear my head?

Thanks...



More information about the Tutor mailing list