Syntax means the arrangement of letters and symbols in code.
So if you get a syntax error, it usually means you've misplaced a symbol or letter somewhere in your code.
Python will usually tell you which line and where in the line the problem is.
Pay very careful attention to the error message. There will be a
points at the precise error point, such as in this example:
It is completely normal for beginners to make syntax errors all the time. The only thing that helps is practice.
You might want to compare your code with code from the reference sheet to check that your syntax follows the format Python expects.
You can also remove lines of code one at a time until you no longer get a syntax error to pinpoint where the issue is. Simplify or rewrite the offending line until you get rid of the error.
==in a comparison
=in the same line
Try our practical beginner lessons, or test your skills with our challenges.