Invisible Syntax Error


#1



def digit_sum(n):
    result = 0
    for n in str(n):
        result += int(n)
    
    return result

It gives me an error saying that "def digit_sum(n):" is improper syntax.
I've looked function declarations up, and that's perfect python syntax, so does anybody know what's going on?


#2

Hi try to refresh the page..


#3

did you try to change the n variable

your code works , try what @wizmarco say