title: How do I include for loops and if statements in dictionary comprehension?
body: <p>I'm learning how to use dictionaries currently and I sort of know how to do dictionary comprehension with for loops. However I want to include an if statement into the for loop. Something similar to this:</p>
  <pre><code>Dict = {}
  for i in range(11):
      if i &lt; 5:
          Dict[i] = 1
      else:
          Dict[i] = 0
  </code></pre>
  <p>How do I turn that mess into dictionary comprehension?</p>