(no subject)

Luuk luuk at invalid.lan
Fri Apr 19 12:10:55 EDT 2019

On 19-4-2019 16:37, Tamara Berger wrote:
> Hi Python-List,
> What code can I use to break out of a program completely, and not just out
> of a loop? I wrote code with 3 conditions for saving for a downpayment. The
> first addresses cases that don't meet the minimum condition; i.e., enough
> money to save for a downpayment within the allotted time. It has its own
> print line, but also executes the irrelevant print lines for the other two
> conditions.
> Thanks,
> Tamara

cond1 = 1;
cond2 = 1;
cond3 = 1;

if cond1:
   if cond2:
     if cond3:
       print("All OK")
       print("cond3 NOK")
     print("cond2 NOK")
   print("cond1 NOK")


More information about the Python-list mailing list