I'm new in Python and I cannot do this simple exercise (i now it's simple but i cannot resolved it). I've been 4 year using many combinations, looking for help here in SO and others forums and nothing help to my problem, this is my nightmare:
letters_count = {
'Alpha': [10, 12, 0, 1],
'Beta': [15, 7, 9, 2],
'Gamma': [6],
'Delta': [2, 2, 4],
'Eta': [9, 9, 9],
}
I need to create a script that subtracts the mean for a given country from each success estimate for that country, only using List Comprehension (with parenthesis) and the output of that be similar at this:
[['Alpha', [4.25, 6.25, -5.75, -4.75]],
['Beta', [6.75, -1.25, 0.75, -6.25]],
['Gamma', [0]],
['Delta', [-0.66, -0.66, 1.33]],
['Eta', [0, 0, 0]]]
I would like to put some of my codes, but none of them works