Of Functions, Objects, and Methods-I NEED HELP PLEASE
Ethan Furman
ethan at stoneleaf.us
Thu Jun 9 09:10:46 EDT 2011
Ethan Furman wrote:
> Larry Hudson wrote:
>> On 06/08/2011 01:09 PM, Cathy James wrote:
>>> Dog Breed: "))
>>> while not dogs:
>>> print("Goodbye!!")
>>> sys.exit()
>>> else:
>>
>> else does not belong with while.
>
> else works just fine with while; it is the path taken when the while is
> exhausted, but not broken out of:
It works with 'for' as well.
~Ethan~
More information about the Python-list
mailing list