A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.w3schools.com/python/ref_exception_indentationerror.asp below:

Website Navigation


Python IndentationError Exception

Python IndentationError Exception

❮ Python Exceptions

Example

An IndentationError will occur if indentation is missing:

if 5 > 2:
print("Five is greater than two!")

Try it Yourself » Definition and Usage

The IndentationError exception occurs when indentitation is missing, or is wrong.

You have to use the same number of spaces in the same block of code, otherwise you get an IndentationError.

More Examples Example

An IndentationError will occur if you use wrong indentation:

if 5 > 2:
  print("Five is greater than two!")
   print("Makes sence!")

Try it Yourself »

❮ Python Exceptions

Track your progress - it's free!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4