5+ Inconsistent Use Of Tabs And Spaces In Indentation Python Background

The recommended is to use spaces.

5+ Inconsistent Use Of Tabs And Spaces In Indentation Python Background. I'm trying to create an application in python 3.2 and i use tabs all the time for indentation, but even the editor changes some of them into spaces and then print out inconsistent for example, i have configured my editor to show transparent tabs and visible spaces because i use tabs to indent code. This is the recommended configuration for python code, because tab widths are editor configuration dependent.

Inconsistent Use Of Tabs And Spaces In Indentation Programmer Sought
Inconsistent Use Of Tabs And Spaces In Indentation Programmer Sought from www.programmersought.com
Go into idle, open up the file and press ctrl+a to select all. You can indent using tabs and spaces in python. Likely there is some code with used tabs for indentation others spaces, so you end up with mixture of both and get said error message.

This is the recommended configuration for python code, because tab widths are editor configuration dependent.

Both of these are considered to be whitespaces when you code. Go into idle, open up the file and press ctrl+a to select all. Both of these are considered to be whitespaces when you code. Replace all of one with the other, and fix your editor to use spaces that error message is happening because you cannot mix tabs and spaces when indenting python 3 code, it's as simple as that.