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