How to put ”a3”:”b3” inside the {} after a? | 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 to put ”a3”:”b3” inside the {} after a?

Dic = {”a”:{”a1”:”b1”,”a2”:”b2”} Dic[”a3”]=”b3” print(dic) Gives {”a”:{”a1”:”b1”,”a2”:”b2”},”a3”:”b3”} But i want {”a”:{”a1”:”b1”,”a2”:”b2”,”a3”:”b3”}}

25th Mar 2022, 11:36 PM
Lenoname
0 Réponse