I am asking this question to get a starting point of the Pythonic way to reduce some of the list contents in the following dictionary using list comprehensions:
{'cycle1': [1, 2407, 2393, 14],
'cycle2': [2, 1657, 1652, 5],
'cycle3': [3, 2698, 2673, 25],
'cycle4': [4, 2116, 2102, 14],
'cycle5': [5, 2065, 2048, 17],
'cycle6': [6, 1633, 1615, 18]}
Each list's columns, though not marked, have these headers:
section_num,account_total,billable_count,nonbillable_count
I want to sum each of the last three columns, account_total, billable_count, non-billable_count in a list comprehension.
I'm just not sure how to sum going through each list member in a comprehension. I need to ask for the values of each key, each value being a list. I'm just a little unsure about how to do that.