On 23/03/06, cm012b5105 <[EMAIL PROTECTED]> wrote:
>>> s = raw_input ("hello what's your name? ")
Traceback ( File "<interactive input>", line 1
if s = raw_input ("hello what's your name? ")
^
SyntaxError: invalid syntax
>>> s = raw_input ("hello what's your name? ") # carmel
>>> if s=='carmel':
... print "Ahh the boss's wife"
...
Ahh the boss's wife
>>>
HTH :)
Hi there i am hoping some one could help me out with a small problem i am in the process of learning python. I am trying to write an interactive programme,
This is a short example.
if s = raw_input ("hello what's your name? ")
if s=='carmel ':
print "Ahh the boss's wife"
What i would like to know is what if she dont write carmel she rights say carm short of me writing if s=='carm': on a new line is there a shorter way of doing this so i can cover all angles on how she might write her name.
Thanks nige
>>> s = raw_input ("hello what's your name? ")
Traceback ( File "<interactive input>", line 1
if s = raw_input ("hello what's your name? ")
^
SyntaxError: invalid syntax
>>> s = raw_input ("hello what's your name? ") # carmel
>>> if s=='carmel':
... print "Ahh the boss's wife"
...
Ahh the boss's wife
>>>
HTH :)
-- http://mail.python.org/mailman/listinfo/python-list