I was reading a tutorial that had these examples in it:

>>> while False:

  print("False is the new True.")


>>> while 6:

  print("Which numbers are True?")


while -1:

  print("Which numbers are True?")


while 0:

  print("Which numbers are True?")



Unfortunately the author never explained these statements.


I was wondering if the gist of a while statement could be explained in the 
context of these examples.


e.g. while False:


means while True is False, which is never True because True is of course True 
not False.


but while 6:


means..... err while 6 is True? and this is True because... err.


Anyway I am a  bit lost with this.


Can anyone shed any light please?


Thanks.                                           
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to