小编Pap*_*gye的帖子

我的"if"声明中的"或"有什么问题?

我试过谷歌,但我找不到这个简单问题的答案.我讨厌自己无法解决这个问题,但我们走了.

如何在其中编写if语句or

例如:

if raw_input=="dog" or "cat" or "small bird":
    print "You can have this animal in your house"
else:
    print "I'm afraid you can't have this animal in your house."
Run Code Online (Sandbox Code Playgroud)

python

2
推荐指数
2
解决办法
224
查看次数

标签 统计

python ×1