Skip to Content.
Sympa Menu

byte-of-python - [Byte-of-Python] Continue statement

byte-of-python AT lists.ibiblio.org

Subject: Discussion regarding the book 'A Byte of Python'

List archive

Chronological Thread  
  • From: Maggical1 AT netscape.net
  • To: byte-of-python AT lists.ibiblio.org
  • Subject: [Byte-of-Python] Continue statement
  • Date: Thu, 04 Aug 2005 13:02:50 -0400

In working thru the examples, there are 2 things I don't understand regarding
the continue example in chapter 6.
1. If I put print statements before the continue, no output is produced.
Example:
while True:
s = raw_input('Enter something : ')
if s == 'quit':
break
if len(s) < 3:
print 'first statement before continue'
print 'second statement before continue'
continue
print 'Input is of sufficient length'
2. As the example is shown, it doesn't matter what size string is input, the
script will always output "Input is of sufficent length", as long as the
string isn't quit.

Thank you in advance for any help or comments in clarifying this for me

Gary

__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp




Archive powered by MHonArc 2.6.24.

Top of Page