I'm trying to solve this ■■■■ 15 section during a day, and it doesn't pass. The problem is "Oops, try again. total([0, 3, 6]) returned 0 instead of 9".

Here's the code:

n = [3, 5, 7]

def total(x):

result = 0

for i in range(0, len(x)):

result = result + x[i]

return result

Any suggestions and solutions would be great.