What does syntax mean?

The rules that say how a language's instructions must be written: the spelling, the brackets, the colons, the indentation. A syntax error is code that breaks those rules, and the program cannot run at all until it is fixed.

Also written as: syntax error, syntax errors

In a lesson

The syntax of a language is its rules of grammar: brackets that close, quotes that end, colons in the right places. Break a rule and Python cannot understand the program at all, so none of it runs, not even the lines before the mistake:

Learn it

Used in

and 4 more lessons.

Do the lesson in the simulator

All glossary terms