How to solve indentation error in python?

Hi guys,

Today i am in mood to discuss the common indentation error in python code. We frequently get the indentation errors such as:

  1. IndentationError: unindent does not match any outer indentation level
  2. IndentationError: unexpected indent

To solve this very easily just type the following code in the command line:

python -m tabnanny

Instead of use your own python file name. This command will suggest the line where the indentation is not correct.

This is such easy way that you dont need python beautifier.

Hope this helps!! Thanks for your upcoming feedbacks.

About the Author

has written 38 stories on this site.

Write a Comment

Gravatars are small images that can show your personality. You can get your gravatar for free today!


Copyright © 2024 Programmer to Programmer- A website for web programming and mobile application programming tutorials.
Wordpress themes