python中成员关系操作符

 

>>> a = ["aa","bb","cc","dd","ee"]
>>> a
['aa', 'bb', 'cc', 'dd', 'ee']
>>> "aa" in a
True
>>> "dd" in a
True
>>> "aa" not in a
False
>>> "dd" not in a
False
>>> "xx" in a
False
>>> "yy" in a
False
>>> "xx" not in a
True
>>> "yy" not in a
True

 

posted @ 2021-02-24 09:15  小鲨鱼2018  阅读(225)  评论(0编辑  收藏  举报