AI engineering glossary · Python core
What is syntax error?
Syntax error (also called SyntaxError): An error found before the program starts, because the code breaks the grammar rules of the language, such as a missing colon, unmatched bracket or bad indentation. The program will not run until it is fixed.
Syntax error: an example
if x > 3 print(x) raises SyntaxError because the colon after the condition is missing.
Related terms
More Python core terms
Where you learn it
Syntax error is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.