I have the following list of dictionaries:
allChannelTraffic = [ { "Web" : 4, "android" : 3 }, { "Web" : 1 }, { "Web" : 1 }, { "Web" : 1 },]
I would like to know the easiest way to get an output like this from the above list:
[{'Web':7,'android':3}]
Where I want to get the sum of the values of all the keys. I heard that using list comprehension in python, we can easily do operations. Can someone please tell me how to implement this using list comprehension?