在python中可以通过in和not in关键字来判读一个list中是否包含一个元素
pythontab = ['p','y','t','h','o','n','t','a','b'] if 't' in pythontab: print 't in pythontab' if 'w' not in pythontab: print 'w is not in pythontab'
in 和 not in 是非常常用的关键字。
已抢16294个
抢已抢49258个
抢已抢4098个
抢已抢3960个
抢已抢5928个
抢已抢2318个
抢