Every line of 'python list contains' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
101 def __contains__(self, value): 102 return value in self._dict
6 def rcontains(obj, seq): 7 """Act like contains, but takes reverse argument order. 8 9 Motivation: use it like ge, le, gt, lt etc. (aka operator(value, const)) 10 """ 11 return contains(seq, obj)
981 def ll_listcontains(lst, obj, eqfn): 982 lng = lst.ll_length() 983 j = 0 984 while j < lng: 985 if eqfn is None: 986 if lst.ll_getitem_fast(j) == obj: 987 return True 988 else: 989 if eqfn(lst.ll_getitem_fast(j), obj): 990 return True 991 j += 1 992 return False