[Tutor] A Question about coding style

Alan Gauld alan.gauld at yahoo.co.uk
Fri Sep 17 06:10:18 EDT 2021


On 17/09/2021 09:18, Alan Gauld via Tutor wrote:

> while True:
>    try:
>       b = input(...)
>       if b<0:...
>     except: continue

And that of course is buggy since there is no exit
from the loop so there should be a break after
the if...

Apologies.
-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list