×
Menu
Index

5.2 IndentationError: Unexpected Indent

Indentation should only take place after a statement ending with a colon ‘:’ The Python interpreter will return an indentation error if there is no indentation after a colon’:’ or the code is indented where it should not be.
 
Code
Error Message
Solution
Code on line 4 should not have been indented as there is no colon ‘:' at the end of line 3