Which of these two operations should be faster? All I want to do is to check if one string is in another. We will ignore case, string-parts, whitespaces and all the like.
I'm assuming the first one, since it checks for existence only, if I'm right, while the latter checks also for position. Are these two operations the best standard ways to search for string anyway?
string = "my foo is your bar"
if "foo" in string:
# do important things
if string.find("foo") > -1:
#do much more important stuff