title: List comprehension to find all numbers between 1 and 1000 which contains 7
body: <p>I am trying to fina all numbers b/1 1 and 1000 that contain 7.</p>
  
  <p>Tried:</p>
  
  <pre><code>lst=[y for y in range(1,1000) if 7 in y]
  print (lst)
  </code></pre>
  
  <p>Got below error:</p>
  
  <pre class="lang-none prettyprint-override"><code>TypeError: argument of type 'int' is not iterable
  </code></pre>
  
  <p>Tried:</p>
  
  <pre><code>lst=[y for y in range(1,1000)]
  newlst=[]
  str1=list(map(lambda x:str(x),lst))
  
  for i in str1:
      if any('7') in i:
          newlst.append(i)
  print (newlst)
  </code></pre>
  
  <p>This gives</p>
  
  <pre class="lang-none prettyprint-override"><code>if any('3') in i:
  TypeError: 'in &lt;string&gt;' requires string as left operand, not bool
  
  Process finished with exit code 1
  </code></pre>
  
  <p>Any idea to accomplish this with list comprehension?</p>