dictionaries with nested lists
Alex Martelli
aleax at aleax.it
Sat Nov 1 17:19:39 EST 2003
More information about the Python-list mailing list
Sat Nov 1 17:19:39 EST 2003
- Previous message (by thread): dictionaries with nested lists
- Next message (by thread): dictionaries with nested lists
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ruari mactaggart wrote: > can i write >>>>dictionary[key][list][3] > > to mean the 3rd item in the list that is the corresponding value for 'key' > ? No, but you can write dictionary[key][2] for that purpose: -- that [list] notation is unneeded and unsupported, -- indices start from 0 so the 3rd one is indexed as [2] Alex
- Previous message (by thread): dictionaries with nested lists
- Next message (by thread): dictionaries with nested lists
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list