Answers for "how to make a new key in a dictionary python"

2

how to create a new dictionary in python

myDict = {'first item' : 'definition'}
#CREATING A BLANK DICTIONARY
myDict = {}
Posted by: Guest on October-21-2020
0

how to make a new key in a dictionary python

a = {"Hello":1}
a["Bye"] = 2
print(a)
# {'Hello':1,'Bye':2}
Posted by: Guest on August-04-2021

Code answers related to "how to make a new key in a dictionary python"

Python Answers by Framework

Browse Popular Code Answers by Language