Python 查看list中是否含有某元素的方法 用关键字in和notin来如下:qwe=[1,2,3,4,5]if2inqwe:print‘good!'else:print‘notgood'666以上这篇Python查看 某元素