Let's assume I have a created a dict that is made up of n keys. Each key is mapped to a list of integers of a consistent length. What I want to make now is a new list that represents the sum of the integers at each point in lists of the dict. To illustrate:
my_dict = {'a': [1, 2, 3, 4], 'b': [2, 3, 4, 5], 'c': [3, 4, 5, 6]}
total_sum_list = []
for key in my_dict.keys():
total_sum_list += ###some way of adding the numbers together
Expected output:
total_sum_list = [6,9,12,15]
As demonstrated above, I am not sure how to set up this for loop so that I can create a list like total_sum_list. I have tried putting together a list comprehension, but my efforts have not been successful thus far. Any suggestions?