You can use
any:if any(x in str for x in a):
Similarly to check if all the strings from the list are found, use
all instead of any.from : https://stackoverflow.com/questions/3389574/check-if-multiple-strings-exist-in-another-string
No comments:
Post a Comment