create a double dictionary in python
to create a double dictionary in python, the following won't work:
>>> x = dict()instead, you need only one set of brackets:
>>> x[1][1] = "foo"
>>> x = dict()
>>> x = [1,1] = "foo"
My blog has moved! Redirecting...
You should be automatically redirected. If not, visit http://stinkpot.afraid.org:8080/tricks/ and update your bookmarks.
0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home