Wizards of stackoverflow,
I wish to combine two lists to create a dictionary, I have used dict & zip, however it does not meet what I require.
If had these lists
keys = ['a', 'a', 'b', 'c']
values = [6, 2, 3, 4]
I would like for the dictionary to reflect the average value such that the output would be:
a_dict = {'a' : 4, 'b' : 3, 'c' : 4}
as a bonus but not required, if this is possible is there anyway to get a count of each duplicate? i.e. output would be followed by 'a' was counted twice, other than just doing the count in the keys.