Feb-09-2017, 12:26 PM
(This post was last modified: Feb-09-2017, 12:28 PM by valerydolce.)
So, i was trying to read the score from the end. Instead of using
scores = game[-1]
i used scores = game[1]
. However i got a new error Error:Traceback (most recent call last):
File "./hw2.py", line 25, in <module>
print(team_average('red_sox.txt'))
File "./hw2.py", line 20, in team_average
if (int(score[0]) - int(score[1])) > 0:
IndexError: string index out of range