---------- Forwarded message ----------
From: "Abdur-Rahmaan Janhangeer" <arj.pyt...@gmail.com>
Date: 11 May 2017 12:26 pm
Subject: Re: [Tutor] While Loop Question
To: "Rafael Skovron" <rskov...@gmail.com>
Cc:

i modified your code to make it look like that :

for i in range(1, 5):

    j=0
    print("outer,  i=",i)
    while j < i:
         print("inner, j=",j)

         j += 1

so it shows that each time the outer loop is reexecuted, i is set to zero.

putting j at the begining completely, it is not reset to zero

Abdur-Rahmaan Janhangeer,
Mauritius
https://abdurrahmaanjanhangeer.wordpress.com
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to