The objective of the proposal is to increase readability.
IMO using re is even more unreadable than the and/or or any/all I mentioned.


quarta-feira, 24 de Abril de 2019 às 05:47:04 UTC+1, Robert Vanden Eynde 
escreveu:
>
> 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.
>
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to