Iteration over a list in a function


#1

'''
n = [3, 5, 7]

def total(numbers):
    result = 0
    for i in range(len(numbers)
        result = numbers[i] + result
    return result
print total(n)

''''

 File "python", line 6
    result = numbers[i] + result
         ^
SyntaxError: invalid syntax

First I would like to thank you all in advance, I really do appreciate this site and its users.
Now.....I'm having trouble finding my answer on the forums here, a lot of links today are bad gateways?

Anyways, I don't understand why I am having the syntax error on the variable there?


#2

If you take a gander at this part, you might realize something important.


#3

thankyou so much lol, missing the ) and the : that follows