Substring Detection? Pythonically?
Joshua Muskovitz
josh at open.com
Thu Oct 5 16:45:00 EDT 2000
> (it may not be obvious, but "not string.find(str, prefix)" is only
> true if str *starts* with prefix)
This was *exactly* the reason for my post. :-) For generic substring
searching, you would use "string.find(str, prefix) != -1".
-- josh
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
More information about the Python-list
mailing list