In first half of this script:
prompt = raw_input(Can you tell me your name? )
if prompt in (Yes, yes, y, Y):
name = raw_input(What's your name? )
elif prompt in (No, no, n, N):
exit(OK, have nice day..)
else:
prompt = name
if name == Santosh:
print Hey! I have the same name.
elif
On 22/07/12 06:58, Santosh Kumar wrote:
prompt = raw_input(Can you tell me your name? )
if prompt in (Yes, yes, y, Y):
name = raw_input(What's your name? )
elif prompt in (No, no, n, N):
exit(OK, have nice day..)
else:
prompt = name
Don't you want
name = prompt?
I
Alexandre Zani wrote:
What you want to write is this:
elif name == John Cleese or name == Michael Palin:
elif name in (John Cleese, Michael Palin):
is better.
--
Steven
___
Tutor maillist - Tutor@python.org
To unsubscribe or change
On Wed, Jul 18, 2012 at 6:09 AM, Steven D'Aprano st...@pearwood.info wrote:
Alexandre Zani wrote:
What you want to write is this:
elif name == John Cleese or name == Michael Palin:
elif name in (John Cleese, Michael Palin):
is better.
--
Steven
Alexandre Zani wrote:
On Wed, Jul 18, 2012 at 6:09 AM, Steven D'Aprano st...@pearwood.info wrote:
Alexandre Zani wrote:
What you want to write is this:
elif name == John Cleese or name == Michael Palin:
elif name in (John Cleese, Michael Palin):
is better.
Better how?
It's shorter,
On Wed, Jul 18, 2012 at 7:44 AM, Steven D'Aprano st...@pearwood.info wrote:
Alexandre Zani wrote:
On Wed, Jul 18, 2012 at 6:09 AM, Steven D'Aprano st...@pearwood.info
wrote:
Alexandre Zani wrote:
What you want to write is this:
elif name == John Cleese or name == Michael Palin:
elif
Here is my script:
name = raw_input(What's your name? )
if name == Santosh:
print Hey!! I have the same name.
elif name == John Cleese or Michael Palin:
print I have no preference about your name. Really!!
else:
print You have a nice name.
The if part works well. The elif part
Hi Santosh,
On Jul 17, 2012, at 10:09 PM, Santosh Kumar wrote:
Here is my script:
name = raw_input(What's your name? )
if name == Santosh:
print Hey!! I have the same name.
elif name == John Cleese or Michael Palin:
print I have no preference about your name. Really!!
else:
On Tue, Jul 17, 2012 at 10:09 PM, Santosh Kumar sntshkm...@gmail.com wrote:
Here is my script:
name = raw_input(What's your name? )
if name == Santosh:
print Hey!! I have the same name.
elif name == John Cleese or Michael Palin:
print I have no preference about your name. Really!!
On Tue, Jul 17, 2012 at 10:21 PM, Andre' Walker-Loud
walksl...@gmail.com wrote:
Hi Santosh,
On Jul 17, 2012, at 10:09 PM, Santosh Kumar wrote:
Here is my script:
name = raw_input(What's your name? )
if name == Santosh:
print Hey!! I have the same name.
elif name == John Cleese or
On Jul 17, 2012, at 10:29 PM, Alexandre Zani wrote:
On Tue, Jul 17, 2012 at 10:21 PM, Andre' Walker-Loud
walksl...@gmail.com wrote:
Hi Santosh,
On Jul 17, 2012, at 10:09 PM, Santosh Kumar wrote:
Here is my script:
name = raw_input(What's your name? )
if name == Santosh:
On 18/07/12 15:09, Santosh Kumar wrote:
Here is my script:
name = raw_input(What's your name? )
if name == Santosh:
print Hey!! I have the same name.
elif name == John Cleese or Michael Palin:
print I have no preference about your name. Really!!
else:
print You have a nice
12 matches
Mail list logo