12:15 code and indent correct same error message no matter what


Here is my code

n = [3, 5, 7]

def total(numbers):
result = 0
for i in numbers
result = result + i
return result

I get the message

File "python", line 5
for i in numbers
SyntaxError: invalid syntax


You should review for loops. You need a colon.


Aaaah, thank you very much. an extra pair of eyes.

Added colon to
for i in numbers:
and it's all good.