Answer the question
In order to leave comments, you need to log in
How to fix Python TabError: inconsistent use of tabs and spaces in indentation error?
import pyautogui as auto
import keyboard as key
print("What mouse button do you want autoclicker 1 - Left 2 - Right write below!")
ttb = input("Enter a number: ")
if ttb == "1":
start_key = input( "Start key: ")
stop_key = input('Stop key: ')
while True:
if key.is_pressed( start_key ):
auto.tripleClick()
if key.is_pressed( stop_key ):
break
elif ttb == "2":
start_key = input("Start key: ")
stop_key = input('Stop key: ')
while True:
if key.is_pressed( start_key ):
auto.tripleClick( button = 'right')
if key.is_pressed( stoop_key ):
break
here is the code, why does it write an error?
TabError: inconsistent use of tabs and spaces in indentation
Answer the question
In order to leave comments, you need to log in
Both spaces and tabs are used as indents. I think this question should be banned for life!
Try next time to add water as spaces and milk as tabs to the cereal. Your stomach will tell you in a passive-aggressive form that you don’t need to mix things that seem to be similar, but they don’t. Also, the python doesn’t really want to eat a mess of two immiscible indentation methods, which, by the way, are generally absent in the example.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question