O
online.service.com
python doesn't have a list.contains() method?
thanks
thanks
python doesn't have a list.contains() method?
python doesn't have a list.contains() method?
False"red" in ["red", "green", "blue"] True
"yellow" in ["red", "green", "blue"]
It does have a __contains__ method, but that's not called directly. Usepython doesn't have a list.contains() method?
python doesn't have a list.contains() method?
False>>> x = [1,2,3,4]
>>> 2 in x True
>>> 42 in x
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.