On 05Aug2022 09:47, Lars Liedtke <l...@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 <c...@cskk.id.au> -- https://mail.python.org/mailman/listinfo/python-list