dictionary in python .append code example
Example 1: dictionary in python does not support append operation
dict_append = {"1" : "Python", "2" : "Java"}
dict_append.update({"3":"C++"})
print(dict_append)
Example 2: Python dictionary append
testing1={'one':1,'two':2}
''' update() is the method of dict() merges another dict into existing ones '''
''' it replaces the keys of exisiting ones with the the new ones '''
testing1.update({'two':3,'noice':69})
print(testing1) """ {'one':1,'two':3,'noice':69} """