Ask coding questions

← Back to all posts
TabError: inconsistent use of tabs and spaces in indentation
adsarebbbad

at the bottom, somehow the enter() code gives an error

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
dabs364
adsarebbbad
Comments
hotnewtop
Coder100

That is because on that line you are using tabs:

In the future, for that, hit ctrl+f, click on .* (regex option) and then for the first input box, type in \t and the second, (two spaces).

Afterwords you will be all set!

Viviotic

@Coder100 AMAZING! You saved me over an hour with this. THANK YOU!!

Coder100

np!! @Viviotic

PattanAhmed

@adsarebbbad Hi,
It's clear as the error itself is referring to the error TabError: inconsistent use of tabs and spaces in indentation.

Anyways, here is the correct code:-
Replace all your code with this:-

That's it
Thanks!

Hope this helps

adsarebbbad

thanks @PattanAhmed

PattanAhmed

@adsarebbbad Welcome!
Happy to help!

adsarebbbad

well, @Coder100 's answer is more effective @PattanAhmed

PattanAhmed
SixBeeps

That line is indented with tabs, but the rest of the stuff is indented with spaces.