Return Indentation 8/9


Here is my code:

def get_class_average(students):
    results = []
for student in students:
return average(results)

I'm getting the error message, " File "python", line 49
SyntaxError: 'return' outside function". What is wrong?


your indentation is wrong

as the error message says, your return is outside the function, but so is your loop 'for'.


this post talks about what you need to know.