Trying to understand nested loops

Cameron Simpson cs at cskk.id.au
Fri Aug 5 04:30:05 EDT 2022


On 05Aug2022 09:47, Lars Liedtke <lal at solute.de> wrote:
>this looks to me like it might be a piece of homework, as it would be 
>given by teachers or professors.
>
>This list has got the rule, that members do not solve other's 
>homework. Because very often homework is meant to sit down and think 
>about it.

Very true.

However, we're happy to help people understand things.

In this case it look like Frank has provided apt advice, showing the OP 
how to see how many times the inner loop runs, which affects how many 
times `var+=1` occurs.

Cheers,
Cameron Simpson <cs at cskk.id.au>


More information about the Python-list mailing list