My text file looks like so (Number of goals each person scores at different dates):
1/23/15 Jack G2
3/15/15 Sally G5
1/23/12 Jack G1
3/15/14 Sally G3
What I want to do is turn that file into a dictionary, I have done:
Goal = {}
with open("(goals_per_person.txt") as goal:
for line in bill:
(name,score) = line.split()
Goals_per_person[int(name)] = goals
But I'm not sure, how I can ignore the date because it's not needed. After I get the respective goal per person i want to add that onto each other and print it. So add the values of the same key