I'm getting an IndentationError. How do I fix it?
I'm getting an IndentationError. How do I fix it? I have a Python script: if True: if False: print('foo') print('bar') However, when I attempt to run my script, Python raises an IndentationError : IndentationError File "script.py", line 4 print('bar') ^ IndentationError: unindent does not match any outer indentation level I kept playing around with my program, and I was also able to produce three other errors: IndentationError: unexpected indent IndentationError: expected an indented block TabError: inconsistent use of tabs and spaces in indentation What do these errors mean? What am I doing wrong? How can I fix my code? If anyone raises a fuss over this...just post a question on Meta Stack Overflow about it. That's the best place to handle discussion on whether or not this question is appropriate, and even if it'd be suitable as a dupe target at all. – Ma...