python中成员操作符

 

>>> test1
['aaa', 'bbb', 'ccc']
>>> "aaa" in test1
True
>>> "ddd" in test1
False
>>> "ccc" in test1
True
>>> "ddd" not in test1
True
>>> "aaa" not in test1
False

 

>>> test1
['aaa', 'bbb', 'ccc']
>>> test1.insert(1,["fff","ggg"])
>>> test1
['aaa', ['fff', 'ggg'], 'bbb', 'ccc']
>>> "aaa" in test1
True
>>> "fff" in test1
False
>>> "fff" not in test1
True

 

上一篇:总结下python的print()格式输出


下一篇:AppScan使用分享