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

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -