Nested structures question

Tim Harig usernet at ilthio.net
Wed Jan 12 15:22:24 EST 2011


On 2011年01月12日, Jason Staudenmayer <jasons at adventureaquarium.com> wrote:
> Return False instead of break should work
>> else:
> print "You guessed it! The number was", the_number
> print "And it only took you", tries, "tries!\n"
> return False

Since he isn't in a function, that isn't any good. He would import sys and
use sys.exit() but that rather defeats the purpose of having a single entry
and exit point to the loop.


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /