Python: Search list and give boolean -


if have list so: list = ['a', 'b', 'c', 'd', 'e',] simplest way boolean answer if, instance asked if 'g' inside list?

l = ['a','b','c','d'] if 'g' in l:     print true 

Comments

Popular posts from this blog

iphone - Three second countdown in cocos2d -

hyperlink - how to do url routing in php -

c++ - CryptStringToBinary API behavior -