online.service....@gmail.com wrote:
python doesn't have a list.contains()   method?

Because it doesn't need one?

  >>> x = [1,2,3,4]
  >>> 2 in x
  True
  >>> 42 in x
  False


pedantic side-note, objects can have a __contains__ method which is used under the covers for "in" testing, so your custom objects can also test for containment.

-tkc



--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to