Why does python require indentation?


#1

I’m new to python. I’ve used other programming languages (mostly Java) before, and the fact that python requires you to indent your code seems strange to me. In Java, I would always indent my code to make it easier to read, but it wouldn’t create an error if I didn’t. Why does python create an error when not properly indented?


#2

Programming languages are build, the person who build python decided to go for indent to improve readability (getting rid of the curly brackets) and forcing indent, also to improve readability. Java doesn’t yell at you if your indent is off.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.