add just a value to dictionary python code example
Example 1: add value to dictionary python
dict[key] = value
Example 2: dictionary append value python
d = {1:2}
d.update({2: 4})
print(d) # {1: 2, 2: 4}
dict[key] = value
d = {1:2}
d.update({2: 4})
print(d) # {1: 2, 2: 4}