Trying to understand nested loops

GB NOTsomeone at microsoft.invalid
Fri Aug 5 05:56:34 EDT 2022


On 05/08/2022 08:56, Frank Millman wrote:

> BTW, there is an indentation error in your original post - line 5 should 
> line up with line 4. 

As a Python beginner, I find that Python is annoyingly picky about 
indents.  And, the significance of indents is a bit of a minefield for 
beginners.

For example, in the above code, the indent of the final line very 
significantly affects the results:

print(var)
     print(var)
         print(var)

These are all different.





More information about the Python-list mailing list