I usually use
[code=python]
check=False
for i in the listA:
if i==value
check= True
[/code]
for checking whether a given values in contained in a list. How can I implement if I define within the context of the original list class with a presumed body of the list method __contains__(se lf,value).
[code=python]
check=False
for i in the listA:
if i==value
check= True
[/code]
for checking whether a given values in contained in a list. How can I implement if I define within the context of the original list class with a presumed body of the list method __contains__(se lf,value).
Comment