0
Make a Dictionary
How can I make a dictionary with the version 3.5.2? Thanks!
4 Respuestas
+ 1
d1 = dict() #empty dictionary, without items
d2 = {"a": 1, "b": 2} #dictionary with items
dictionary creating is the same in python 2 and 3
0
Is that the whole structure, Demeth?
0
examples of most common cases, when you create empty dictionary and fill it later or when you initialize some key:value pairs before.
you are free to structurize your dictionary as you want, it's very flexible structure.
the syntax and how to work with dictionaries you can learn in this course, where to use it and what to store there depends on you and your program
0
Well, thanks a lot Demeth!