今天在学Python的关键字“and,or”。
写了这个代码:
color = input("please enter your color :")
if color =="red" or color == "yellow" or color == "black" and color == "white":
print("haha man, you got it !")
else:
print("ennnnnn, sorry.")
却怎么也打不出 if 的结果,
试过了:"redwhite","red white", "red,white"
代码的运行结果都是:“ennnnnn, sorry.”
请问要怎么才能得到:“haha man, you got it !”?
谢谢!!!