[Python-ideas] contains_any_in and contains_all_in
Robert Vanden Eynde
robertve92 at gmail.com
Wed Apr 24 00:45:46 EDT 2019
>
> Trivial with re module, which will answer thequestion in one pass.
>
re.search('|'.join(map(re.escape, ['string1', 'string2', 'string3'])),
master_string)
For those who might find it non trivial.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20190424/72a91c59/attachment.html>
More information about the Python-ideas
mailing list