Multidimensional Dictionaries: Possible?
Jerry Gardner
w6uv at hotmail.com
Mon Jan 24 19:02:31 EST 2000
Are multidimensional dictionaries possible in Python? I'm sure they're
possible, but I can't figure out the syntax.
Here's how I do it in Perl:
%dict = (); # create empty dictionary
$dict{$key1}{$key2} = $string; # make an entry
$newstring = ${dict{$key1}{$key2}}; # access an entry
--
Jerry Gardner | "Bill Clinton has all the steely resolve
w6uv at hotmail.com | of a kamikaze pilot on his 37th mission."
More information about the Python-list
mailing list