[Tutor] Multi-Dimensional Dictionary that contains a 12 element list.
pkraus at pelsupply.com
Thu Dec 29 20:23:08 CET 2005
On Wednesday 28 December 2005 11:30 am, Kent Johnson wrote:
> Python lists don't create new elements on assignment (I think Perl lists
> do this?) so for example
> dictionary[(key1, key2)] = X
ok so assuming I had a dictionary with 1key that contained a list like so...
How would I increment it or assign it if it didn't exist. I assumed like this.
dict[key1] = dictionary.get(key1,0) + X
PEL Supply Company
More information about the Tutor