Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to make a new key in a dictionary python

a = {"Hello":1}
a["Bye"] = 2
print(a)
# {'Hello':1,'Bye':2}
 
PREVIOUS NEXT
Tagged: #key #dictionary #python
ADD COMMENT
Topic
Name
2+2 =