why not "'in' in 'in'"?
marklists at mceahern.com
Thu Jun 13 16:24:22 CEST 2002
I haven't followed this thread. Someone else has probably already suggested
this, but in case they haven't, it's fairly easy to define your own function
that does what you want:
def is_in(search, search_for):
"""Return bool indicating whether search_for is in search."""
return search.find(search_for) >= 0
subject = "i like spam, i do."
x = "spam"
y = "ham"
print is_in(subject, x)
print is_in(subject, y)
More information about the Python-list