x = "abcdefg"
print "abc" in x // True
print "xyz" in x //False
This entry was posted
on Saturday, October 4th, 2008 at 9:30 am and is filed under Python.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
http://docs.python.org/library/string.html#deprecated-string-functions
bah, the instance method is not being deprecated; anyhoo, (‘foo’ in ‘barfoo’)
This can be finished simply using the “find” method.