[Tutor] Truckers Log....Me Again

Anton Sherwood bronto@pobox.com
Sun, 20 Jan 2002 22:06:54 -0800


> On Sun, 20 Jan 2002, glidedon wrote:
> > I am trying to figure out how to do this in a while loop.
	[...]

Danny Yoo wrote, omitting one line:
> while 1:
>     read the input x
>     if x == yes:
>         do this
>     elif x == no:
>         do the other thing
          break			####
>     else:
>         print some warning

as in C, `break' aborts the nearest enclosing loop,
which appears to be what Glidedon appears to have in mind.

-- 
Anton Sherwood  --  http://www.ogre.nu/