Thomas C. Hicks
2015-10-22 21:50:14 UTC
complex = {name ="value",surname="po",age=poi)
What is the most pythonic way to build a dictionary of dictionary?thanks for any help!
This doesn't look too complex so I am probably missing something.What is the most pythonic way to build a dictionary of dictionary?thanks for any help!
The normal dictionary construction would look something like this:
mydict = dict('name'='value', 'surname'='po','age'='poi')
Then you can access any given item in mydict with the get method:
mydict.get('name')
SDG,
tom
_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor