user
Give an example of a syntax error in Python.


assistant
Syntax errors can occur if incorrect syntax is used, such as forgetting a colon at the end of a loop statement. For example:

for i in range(10)
    print(i) # missing a colon after the loop statement.