Indentation in python

in this tutorial you will learn about python indentation which is used to represent block of statement in python programming.

  • Most of the programming language like C, C++, Java uses braces {} to define block of statement.
  • Python uses identation for define block of statement.
  • It start with indentation and ends with first unintended line.


if i==5:
      for i in range(1,10):
  • Incorrect indentation will result into indentation error.
Was this article helpful?

Leave a Comment