matching list of substrings to a list of strings in Python
As described in this
answer, a regular expression would be the way to go, since these are
modeled as a DFA that can check for all substrings at the same time. You
should probably read that answer, as it is quite in-depth.