strings = ['I have a bird', 'I have a bag and a bird', 'I have a bag']
words = ['bird','bag']
I want to find the string that includes both bird and bag in the list strings
, regardless of order. So the result for only the second element in strings
should be true and the rest should be false.
The output I want:
False
True
False
words
do not necessarily need to be stored in list, and I know that regex
could do a similar thing but I would prefer to use other ways than regex
because my words are mandarin chinese which requires some complicated use of regex than english.