Yes, this is really a syntax error.
You probably want:
j += 1
if j == 9:
return True
The reason is that python requires an expression after the keyword if( docs ), whereas it j += 1is an operator.
And congratulations, you just dodged a bullet without translating it into:
if (++j == 9):
return True
which is valid Python code and will almost certainly be a mistake!
source
share