Nov-17-2019, 04:37 PM
(Nov-17-2019, 08:37 AM)buran Wrote: you can use list comprehensionscores = [int(score) for score in data[1:]]ormap
scores = map(int, data[1:5])thengrade = sum(scores)
Thanks. It was able to add all the scores. Is there a way to get it to add the scores on each line separately? I tried putting the code into the for loop but it still just prints the total.