title: Python any() function within a list comprehension
body: <p>I'm new to Python (2 weeks!) and struggling with the following:</p>
  
  <p>I have a list of URLs that I want to iterate through and find just certain URLs. To do this
  I want to test any members of a tuple are present in the URL.</p>
  
  <p>I've figured out I need a any() statement but can't get the syntax right: </p>
  
  <pre><code>allurls = [&lt;big list of URLs&gt;]
  
  words = ('bob', 'fred', 'tom')
  
  urlsIwant = [x for x in allurls if any(w for w in words) in x]
  </code></pre>
  
  <p>gets me </p>
  
  <pre><code>TypeError: 'in &lt;string&gt;' requires string as left operand, not bool
  </code></pre>
  
  <p>I don't think it's relevant but my actual code is</p>
  
  <pre><code>urlsIwant = sorted(set([x for x in allurls if dict['value'] in x and any(w for w in words) in x]))
  </code></pre>