What is causing these indentation errors in python? This drives me crazy as I run into them and just mess around until it goes away.
Asked
Active
Viewed 77 times
0
-
Is it because I copy pasted the code from another editor to repl.it? How do I solve this? – Aleka May 07 '20 at 02:52
-
2what kind of editor are you using? I think the issue here imight be the mixture of spaces and tabs. Some editors are so sensitive to that. You either use only tabs or only spaces – Onyambu May 07 '20 at 02:54
-
Does this answer your question? [How to fix Python indentation](https://stackoverflow.com/questions/1024435/how-to-fix-python-indentation) / [I'm getting an IndentationError. How do I fix it?](https://stackoverflow.com/questions/45621722/im-getting-an-indentationerror-how-do-i-fix-it) – TrebledJ May 07 '20 at 03:09
1 Answers
0
Python compilers can be extremely sensitive and treat tabs and spaces separately. You cannot use tab on some lines and use spaces on others, even if they appear to be the same within the shell or editor.

Kasey Chang
- 532
- 4
- 12