From here there was a duplicate of this question, but I thought that I could offer an idea of ââmodern editors and the huge number of functions that they offer. In Python code, everything that needs to be placed in a .py file must be either entirely using the tab key or spaces. The convention is to use four spaces to indent. Most editors have the ability to visually show in the editor whether the code is indented from spaces or tabs, which helps a lot when debugging. For example, with an atom, going to settings and then the editor, you can see the following two options:

Then, if your code uses spaces, you will see small dots where your code is indented:

And if you indent using tabs, you will see something like this:

Now, if you notice, you can see that when using the tabs on the left there are more errors / warnings, this is due to what pep8 is called, the pep8 documentation , which basically is a single style guide for python, so thatâs all developers basically write code the same standard and appearance that helps when trying to understand other people's code, it is in pep8, which prefers to use spaces for indentation rather than tabs. And we see that the editor shows that there is a warning regarding warning code W191 ,
I hope that all of the above will help you understand the nature of the problem you are facing and how to prevent it in the future.
jupiar Feb 05 '19 at 16:27 2019-02-05 16:27
source share