Apr-01-2020, 08:04 PM
I just started reading an intro to Python piece. It shows simple examples of several statements (def, for, while). I'm just getting started, but it looks like the Python compiler (interpreter?) depends on the indentation of the statements to define what is or is not part of a procedure. It looks like there are no End statements.
Is this not error prone? Does it matter how much a statement is indented?
It seems odd to me that spaces have a role in syntax other than in separating tokens.
I would appreciate someone helping me understand why
Thanks
Is this not error prone? Does it matter how much a statement is indented?
It seems odd to me that spaces have a role in syntax other than in separating tokens.
I would appreciate someone helping me understand why
for i in range(10): statement statement statementIs as good (clear, readable) as something like
for i in range(10): statement statement statement end iAnd, of course, it gets worse with nested structures
Thanks