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
With regex that would be:
import re words = ['string_1', 'string_2', ...] if re.search('|'.join([re.escape(w) for w in words]), var_string): blahblah