How:Python Dictionary assignment? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

How:Python Dictionary assignment?

How can we call an item from Python dict() and assign value to it?

8th Sep 2019, 7:57 PM
Haider Bahaa
Haider Bahaa - avatar
1 Réponse
+ 4
Very simple: d = dict() d["a"] = "something" print(d["a"]) d["a"] = "something else" print(d["a"]) Or do you mean something else?
8th Sep 2019, 8:13 PM
Matthias
Matthias - avatar