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

java.util.scanner - How to read and add only numbers to array from a text file -

html - Repeat image to extend header to fill screen -

javascript - Backbone.js getting target attribute -