dictionaries with nested lists

Raymond Hettinger vze4rx4y at verizon.net
Sat Nov 1 18:38:59 EST 2003


[ruari mactaggart]
> what if i mean
> bands={'beatles':['john','paul','george','ringo'],['guitar','bass','guitar',
> 'drums']}
>
> then i need to put bands['beatles'][1][3]='percussion'
>
> i presume... ?

No need to presume.
Just fire up the interpreter and see.

Compared to comp.lang.python responders,
the results are instant, always accurate, and
immediately available for exploring alternatives.


Raymond Hettinger






More information about the Python-list mailing list