3Requestdata3判断 检查某个元素是否存在于列表或者字典

Posted 克维拉

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了3Requestdata3判断 检查某个元素是否存在于列表或者字典相关的知识,希望对你有一定的参考价值。

 

3Requestdata3判断

检查某个元素是否存在于列表或者字典

animals = ["cat", "dog", "rabbit"]

if "cat" in animals:

    print("Cat found")

 

cat_found = "cat" in animals

 

 

 

1requestData 判断

if aaa:

if aaa:

    print()

 

 

 

以上是关于3Requestdata3判断 检查某个元素是否存在于列表或者字典的主要内容,如果未能解决你的问题,请参考以下文章