0

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

27th Oct 2016, 8:47 PM
Jordan
2 Respostas
+ 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