重複の可能性:
Python での OR の動作:
私はプログラミングの初心者で、最初の言語として 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."
しかし、プログラムを実行するたびに、「こんにちは」と入力すると正常に動作し、「こんにちは!」と返信されます。しかし、入力として次のように入力するたびに、「お元気ですか?」それでも「やあ!」と出力されます。「I'm good and you?」と表示させたい 「こんにちは!」の代わりに また。初心者なので簡単にお願いします。