What is indentation in python?
![](https://pythonpoint.net/wp-content/uploads/2020/11/How-to-declare-array-in-python_-5-1024x576.jpg)
Indentation is a space given before writing a certain code. It is not so important in other programming language like C, C++, etc. But it has a major role in python.
Python uses indentation to indicate a block of code.
If we’ll not follow a certain indentation, python interpreter will show indentation error.
IndentationError: expected an indented block.
e.g.,
if("python"=="Python") print("true")
![](https://pythonpoint.net/wp-content/uploads/2020/11/Screenshot-653-1024x525.png)
if("python"=="python") print("true")
![](https://pythonpoint.net/wp-content/uploads/2020/11/Screenshot-654-1024x206.png)
You can see here how important is indentation in python.
Subscribe
Login
Please login to comment
0 Discussion