I have to check a lot of worlds if they are in string... code looks like:
if \"string_1\" in var_string or \"string_2\" in var_string or \"string_3\" in var_stri
Have you looked at filter?
filter( lambda x: x in var_string, ["myString", "nextString"])
which then can be combined with map to get this
map( doSomething(), filter(lambda x: x in var_string, ["myString", "nextString"] ) )
EDIT:
of course that doesn't do what you want. Go with the any
solution. For some reason I thought you wanted it done every time instead of just once.