If string equals item from list a, followed by item from list b
<p>I'd like to make an if statement to detect if a string could be formed with items from lists, in order. For example, if I want to check if a term had the same meaning as "HelloWorld", I'd have a "hello" list with <code>['hello', 'Hello', 'Hi', 'Greetings', 'Hola']</code>, and a "world" list with <code>['world', 'World', 'Planet', 'Earth']</code>. Then, check if a string is equal to any item from the "hello" list, directly followed by any item from the "world" list. "HelloWorld", "GreetingsEarth", and "HiPlanet" would all successfully trip the if statement. How would I do this? I'd like to use Python lists, so regex (a|b) seems impractical.</p>
