Make sure you are not using a Python keyword for a variable name.Check that you have a colon at the end of the header of every compound statement, including for, while, if, and def statements.Check that indentation is consistent. … Make sure that any strings in the code have matching quotation marks.
How do you find the syntax error?
- Make sure you are not using a Python keyword for a variable name.
- Check that you have a colon at the end of the header of every compound statement, including for, while, if, and def statements.
- Check that indentation is consistent. …
- Make sure that any strings in the code have matching quotation marks.
How do you fix a syntax error?
- In File Manager, locate the file named in the error. Right-click the file and select Edit.
- Go to the line number specified in the error. …
- When you’ve corrected the error, click Save Changes and close the file.