1dict_append = {"1" : "Python", "2" : "Java"}
2dict_append.update({"3":"C++"}) # append doesn't supported in dict
3 # instead , use update in dict
4print(dict_append)
5# output : {'1': 'Python', '2': 'Java', '3': 'C++'}
1dict = {1 : 'one', 2 : 'two'}
2# Print out the dict
3print(dict)
4# Add something to it
5dict[3] = 'three'
6# Print it out to see it has changed
7print(dict)