title: How to print numbers from 1 to 1000 and then only even numbers within the same loop
body: <p>I have the task of printing the numbers from 1 to 1000 with only using two lines of code. Which I've managed to do. The problem I'm having is <strong>within the same loop</strong> I have to print a separate list of numbers using the modular operator "%2". My current code below is printing the numbers from 1 to 1000 but then in between its printing if the number is devisible by 2 and printing true or false. I need to print this new list of even numbers separately.</p>
  
  <p>my code is as follows:</p>
  
  <pre><code>for num in range(1,1001):
      print (num)
      num2 = num%2==0
      print (num2)
  </code></pre>
  
  <p>Any help would really be appreciated!</p>