可能重复:
或python中的行为:
我是编程的初学者,并选择 python 作为我的第一语言..
print "start the conversation"
conversation = raw_input()
if conversation == "Hi" or "hi" or "Hello" or "hello":
print "Hey there!"
elif conversation == "How are you?" or "how are you?":
print "I'm good and you?"
else:
print "No one starts a conversation like this."
但是当我运行程序时它运行良好我输入“嗨”它回复“嘿那里!” 但每当我输入以下内容作为输入“你好吗?” 它仍然打印出“嘿!” 我想让它打印出“我很好,你呢?” 而不是“嘿!” 再次。请让它容易,因为我是一个初学者。