title: Python Generating random even numbers using list comprehension
body: <p>A contrived example to try and understand Python list comprehensions</p>
  
  <p>I want to generate a list of 1000 random even numbers in the range of 1 to 100
  This is what I have</p>
  
  <pre><code>import random
  list = [random.randint(1,100) for _ in range(1,1000) if _ %2 ==0]
  </code></pre>
  
  <p>I am not able to figure out how to check the result of the randint() in the for loop.</p>
  
  <p>I know this can possibly be done with <code>random.randrange(x,y,2)</code> or another mechanism. I want to understand if I can do it in the list comprehension way.</p>