Error: "Oops, try again. total([0, 3, 6]) resulted in an error: list index out of range"
Why doesn't this work? Also, is(why is) print necessary after the for loop?
Can you explain what I'm asking my code to do which is causing the issue? I want to understand better.
n = [3, 5, 7] def total(numbers): result = 0 for item in numbers: print item result += numbers[item] return result