Cai Gengyang <gengyang...@gmail.com> writes: Statement 0:
>count = 0 Statement 1: >if count < 5: > print "Hello, I am an if statement and count is", count Statement 2: >while count < 10: > print "Hello, I am a while and count is", count > count += 1 There are three statements here. They are executed in the given sequence. First, statement 0 binds the name â»countâ« to an object which has the int-value â»0â«. Next, statement 1 prints â»am an ifâ«. Now statement 1 was executed. It will never be revisited. It's history. Next, statement 2 will print "am a while" several times. It is separated from statement 2, like, totally. The statement 1 is in the remote past from where it never will return to be executed while the while loop is happily printing aways its "am a while" :-). Statement 1 is sad :-(, because it will never print no more. Never more.
-- https://mail.python.org/mailman/listinfo/python-list