python判断list中是否包含某个元素
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'
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3