praba kar wrote:

In Php we can find in_array() function
which function is mainly useful to check
whether a specific value is exist in the array
or not.

But In python In cannot find any function
like that.

If you just want a boolean result you can use x in l:

>>> l = range(5)
>>> l
[0, 1, 2, 3, 4]
>>> 3 in l
True
>>> 42 in l
False
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to