Why do I get “SyntaxError: invalid syntax” in a line with perfectly valid syntax?
For earlier versions of Python(1), an error may reported on a line that appears to be correct. In that case, you should try commenting out the line where the error appears to be. If the error moves to the next line, there are two possibilities: Either both lines have a problem (and the second was … Read more