0
Indention
What happens if you indent code without having a statement that needs invention before (like if, for, def...) ? Will it run?
3 Answers
+ 7
No. Indentation is very rigid in Python and is part of the syntax. It's like forgetting a semi-colon in C++ or Java :)
+ 7
Python enforces indentations to keep blocks of codes together. This is similar to C/C++, Java and other languages using {} to keep stuff together.
+ 2
you will get an error "unexpected indent"



