Python Indentations

Where in other programming languages the indentation in code is for readability only, in Python the indentation is very important.
Python uses indentation to indicate a block of code.

Example

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

Python will give you an error if you skip the indentation:

Example

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





Comments

Popular posts from this blog

Python - How to Escape special characters in String

Python - Argument Passing