theList = ['a','b','c']
if 'a' in theList:
print 'a in the list'
if 'd' not in theList:
print 'd is not in the list'
python 中如何判断list中是否包含某个元素
最新推荐文章于 2023-07-30 09:00:00 发布
theList = ['a','b','c']
if 'a' in theList:
print 'a in the list'
if 'd' not in theList:
print 'd is not in the list'