# Basic syntax:
dictionary['new_key']='new_value'# Example usage:
d ={'a':1,'b':5}# Define dictionary
d['c']=37# Add a new key to the dictionaryprint(d)-->{'a':1,'b':5,'c':37}
how to add a key and a value to a dictionary in python
diction ={'key':'value'}#Adding a dictionary called diction.print(diction)
diction['newkey']='newvalue'#Adding the newkey key to diction with its value.print(diction)#output: {'key':'value','newkey':'newvalue'}
a_dictionary ={}#creates a blank dictionary#variables created outside of dictionary
name ="Geronimo"#this will become a key to access the value
age =34#This becomes the value assigned to the key
a_dictionary[name]= bid #this adds the key and the value