Back to Python Errors
Python Exception

IndentationError

Unexpected indent

What does this error mean?

Occurs when indentation is incorrect or inconsistent.

How to fix IndentationError?

Use consistent indentation (spaces or tabs, not both). Check for mixed indentation.

Example
if True: print('yes') print('no') # IndentationError