New assignmens ...
Chris Angelico
rosuav at gmail.com
Wed Oct 27 14:35:54 EDT 2021
On Thu, Oct 28, 2021 at 4:03 AM Antoon Pardon <antoon.pardon at vub.be> wrote:
>
> So suppose I have an arbitrary number of simple statements. The
> latter possible using results from previous assignment and at the
> end a condition to control the one and a half loop. How do you write
> the python code so that the one and a half loop is easy to recognize?
>
The most general way to write a loop-and-a-half is to invert the
condition and break. For cases too complicated to fit into the loop
header, that would be the obvious solution.
ChrisA
More information about the Python-list
mailing list