What is indentation error in Python
Indentation refers to the spaces at the beginning of a code line.
In other programming languages the indentation in code is for readability only, but the indentation in Python is very important.
Python uses indentation to indicate a block of code.
Python will give you an error if you skip the indentation.
The number of spaces is up to you as a programmer, but it has to be at least one. Otherwise an indentation error as shown above will occur.
Subscribe
Login
Please login to comment
0 Discussion