Trying to use zip() to create a dictionary from two lists (keys and values) where there is a repeated key element. What I want is for the dictionary to have a single key for the repeated element and for the corresponding value to be the sum of the repeated values.
lst1 = ['a', 'b', 'c', 'd', 'b']
lst2 = [2, 3, 4, 5, 6]
new_dictionary = dict(zip(lst1,lst2))
print(new_dictionary)
Actual output: {'a': 2, 'b': 6, 'c': 4, 'd': 5}
Desired output: {'a': 2, 'b': 9, 'c': 4, 'd': 5}