On 10/23/2015 05:59 AM, Alex Kleider wrote:
mydict = dict('name'='value', 'surname'='po','age'='poi')
Oops, you are correct! Don't want to put the key names in quotes, I
mistyped my experiment.
SDG,
tom
___
Tutor maillist - Tutor@python.org
To uns
jarod_v6--- via Tutor writes:
> Hi!!I would like to prepare a dictionary with complex structure:
>
> complex = {name ="value",surname="po",age=poi)
That's invalid syntax (the braces don't match) and it seems to use names
from elsewhere.
If you mean a dictionary like this::
wibble = {'name'
On 22Oct2015 23:19, jarod...@libero.it wrote:
Hi!!I would like to prepare a dictionary with complex structure:
complex = {name ="value",surname="po",age=poi)
Well, in Python you'd write the above like this:
complex = {'name': "value", 'surname': "po", 'age': poi}
What is the most pythonic
On 2015-10-22 14:50, Thomas C. Hicks wrote:
On 10/23/2015 05:19 AM, jarod_v6--- via Tutor wrote:
Hi!!I would like to prepare a dictionary with complex structure:
complex = {name ="value",surname="po",age=poi)
What is the most pythonic way to build a dictionary of
dictionary?thanks for any
On 10/23/2015 05:19 AM, jarod_v6--- via Tutor wrote:
Hi!!I would like to prepare a dictionary with complex structure:
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