-1

I coded a few lines in python for some other activity but when I run the python script I always get indentation error or TabError : inconsistent use of tabs and spaces in indentation.

Is there any way to fix this using Unix command without installing any IDE or Pycharm?

Error below :

TabError: inconsistent use of tabs and spaces in indentation

mkrieger1
  • 14,486
  • 4
  • 43
  • 54
codeholic24
  • 808
  • 3
  • 17
  • Please show us some code. It will be helpful. –  Jun 06 '21 at 10:06
  • 1
    Does this answer your question? ["inconsistent use of tabs and spaces in indentation"](https://stackoverflow.com/questions/5685406/inconsistent-use-of-tabs-and-spaces-in-indentation) – Stuti Rastogi Jun 06 '21 at 10:08

1 Answers1

0

The expand utility replaces tabs with spaces. But you really want to configure your editor to indent Python code using only spaces instead.

tripleee
  • 158,107
  • 27
  • 234
  • 292