Why it doesn't work?

Lad python at hope.cz
Sun Jan 8 14:11:48 CET 2006


I have a list
L={}
Now I can assign the value
L['a']=1
and I have
L={'a': 1}

but I would like to have a dictionary like this
L={'a': {'b':2}}

so I would expect I can do
L['a']['b']=2

but it does not work. Why?

Thank you for reply
Rg,
L.




More information about the Python-list mailing list