Extending dict (dict's) to allow for multidimensional dictionary
Paul Rubin
no.email at nospam.invalid
Sat Mar 5 15:05:43 EST 2011
Ravi <ra.ravi.rav at gmail.com> writes:
> I can extend dictionary to allow for the my own special look-up
> tables. However now I want to be able to define multidimensional
> dictionary which supports look-up like this:
>
> d[1]['abc'][40] = 'dummy'
Why do that anyway? You can use a tuple as a subscript:
d[1,'abc',40] = 'dummy'
More information about the Python-list
mailing list