Search for any word or combination of words from one string in a list (python)
问题 I have a string (for example: "alpha beta charlie, delta&epsilon foxtrot" ) and a list (for example ["zero","omega virginia","apple beta charlie"] ). Is there a convenient way to iterate through every word and combination of words in the string in order to search for it in the list? 回答1: Purpose You're saying combinations, but combinations are semantically unordered, what you mean, is you intend to find the intersection of all ordered permutations joined by spaces with a target list. To begin