I am writing a function that takes an input that calls two other functions. I've had no problem writing the two other functions but for some reason I'm getting an error message writing the third, having to do with the syntax.
def get_class_average(students):
results=[]
for student in students:
x=get_average(student)
results.append(x)
return average(results)
and I get an error code:
def get_class_average(students):
^
SyntaxError: invalid syntax
What am I missing? There doesn't seem to be anything wrong with the way I wrote def.
python -tt my_script.pywhich will check for mixed tabs and spaces - Joran Beasley