0

What does 'unindent does not match any outer indentation level' mean?

27th Oct 2016, 8:47 PM
Jordan
2 Answers
+ 1
Check amount of tabs and spaces in each string of your code :)
27th Oct 2016, 9:08 PM
ŠŠ½Ń‚Š¾Š½ Š›Š°Š·Š¾Š²ŃŠŗŠøŠ¹
ŠŠ½Ń‚Š¾Š½ Š›Š°Š·Š¾Š²ŃŠŗŠøŠ¹ - avatar
+ 1
Python knows which lines execute in the same context by their indentation depth. It can't determine which block the 'less-indented' code goes to; all it knows is that you can't back out a half step without first taking a half-step in. for i in range(9): codecodecode for j in range(9): codecodecode print("which 'for' do I belong to? An exception.") ...either it's accidentally too far left or not enough (in the 'out' direction)
28th Oct 2016, 5:49 AM
Kirk Schafer
Kirk Schafer - avatar