python - If either needle in haystack -
I know that I can:
If 'Hello World' Hello ':
What if I had many needles (' .csss ',' .js ',' .jpg ',' .gif ',' .png ',' .com ') and I want to check whether one of these is in the string or not.
(Note: ends
will not do this in this case, they can not be the suffix)
< Div class = "post-text" itemprop = "text">
You can find useful:
haystack = 'hello world' needle = ['. CSS ','. If someone (Needles for a needle needle in needles): Pass # ...
, '.jpg', '.gif', '.png' / Div>
Comments
Post a Comment