question about dictionary type..
eugene kim
eugene1977 at hotmail.com
Fri Sep 13 19:13:23 EDT 2002
hi..
i'd like to have a dictionary which looks like
table = { category1 : { category2 : { category3 : 'garbage value' } } }
category1 has many category2
category2 has many category3
i expected
table[ 'computer' ][ 'language' ][ 'python' ] = 0
to create {computer : { language : { python :0 }}}
table[ 'computer' ][ 'language' ][ 'java' ] = 0
to becomes { 'computer' : { 'language' : { 'python' :0 , 'java' :0 }}}
but python doesn't allow me to do this..
can anyone help me?
thank you
More information about the Python-list
mailing list