"rick" wrote
while True:
reply = input('Enter text:')
if reply == 'stop': break
print(reply.upper())
which works "as advertised" in an interactive session, but not in a
script. Yes, I tried tossing the script to both versions of
interpreter, it doesn't work with either 2.6 or 3.1.
Op 25-12-09 17:49, rick schreef:
I'm working my way through Mr Lutz's "Learning Python", and I come to
this snippet (page 271):
while True:
reply = input('Enter text:')
Try this:
reply = raw_input('Enter text: ')
Cheers,
Timo
if reply == 'stop': break
print(reply.upper
I'm working my way through Mr Lutz's "Learning Python", and I come to
this snippet (page 271):
while True:
reply = input('Enter text:')
if reply == 'stop': break
print(reply.upper())
which works "as advertised" in an interactive session, but not in a
script. Yes, I tried tossing the