0

I have looked for an answer to my question, but it seems there are none for my problem specifically. Which has lead me to believe this is a simple error............

def intest():

  choice = raw_input("> ")

  if "hello" or "world" in choice:
    print "There is hello or world in 'choice'"
  elif "bye" or "cya" in choice:
    print "There is bye or cya in 'choice'"
  else:
    print "Go again"
    return intest()

intest()

When run, no matter what is typed in the raw_input, the first if-statement is the one that executes. What is the problem?

ZdaR
  • 22,343
  • 7
  • 66
  • 87
Kyle
  • 303
  • 8
  • 21

1 Answers1

1

Change your if statements like,

if "hello" in choice or "world" in choice:
Avinash Raj
  • 172,303
  • 28
  • 230
  • 274