Indentation is part of Python's syntax.
Discarding the indentation is no different to discarding the { }
in C (i.e you end up with broken or incorrect code)
Why? This question is answered in the Design and History FAQ,
Guido van Rossum believes that using indentation for grouping is
extremely elegant and contributes a lot to the clarity of the average
Python program. Most people learn to love this feature after a while.
Since there are no begin/end brackets there cannot be a disagreement
between grouping perceived by the parser and the human reader.
Occasionally C programmers will encounter a fragment of code like
this:
if (x <= y)
x++;
y--;
z++;
Only the x++ statement is executed if the condition is true, but the
indentation leads you to believe otherwise. Even experienced C
programmers will sometimes stare at it a long time wondering why y is
being decremented even for x > y.
Because there are no begin/end brackets, Python is much less prone to
coding-style conflicts. In C there are many different ways to place
the braces. If you’re used to reading and writing code that uses one
style, you will feel at least slightly uneasy when reading (or being
required to write) another style.
Many coding styles place begin/end brackets on a line by themselves.
This makes programs considerably longer and wastes valuable screen
space, making it harder to get a good overview of a program. Ideally,
a function should fit on one screen (say, 20-30 lines). 20 lines of
Python can do a lot more work than 20 lines of C. This is not solely
due to the lack of begin/end brackets – the lack of declarations and
the high-level data types are also responsible – but the
indentation-based syntax certainly helps
Also the History of Python has an additional story about the origins of the indentation syntax