Multiple Substrings in String - Python -


why wouldn't code return "true" if of substrings located in larger somestring?

substring1 = "foo" substring2 = "text" somestring = "texting"  if ((substring1 or substring2) in somestring):     print "true" 

i've looked any() function don't think it's i'm looking for.


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -