def grades_variance(scores):

-variance = 0

-for score in scores:

--variance += (grades_average(scores)-score)**2

-variance /= float(len(scores))

-return variance

print grades_variance(grades)

This keeps diving me:

File "python", line 18

def grades_variance(scores):

^

SyntaxError: invalid syntax

and I don't understand why the def function is invalid. Can anyone help?