In [2]:
student = {} # empty dictionary
In [3]:
# set some values
student['Name'] = 'Michael'
student['GPA'] = 3.4
student['Ischool'] = True
print(student)
In [4]:
# mutable
student['GPA'] = 4.0
print(student['Name'], student['GPA'])
In [1]:
a = {"a": "b", "x": "y", "2": 2}
print(a[2])
In [ ]:
In [ ]: