title: Pythonic Way to Initialize Boolean
body: <p>I would like to know your preferred way to initialize a boolean. I can't find any good reason for one of the solutions by my own.</p>
  
  <p>After the initialization I use isLastInMonth in a loop and don't want to call monthrange any time!</p>
  
  <p>Example 1:</p>
  
  <pre><code>if monthrange(2015, 5)[1] == today.day:
      isLastInMonth = True
  else:
      isLastInMonth = False
  </code></pre>
  
  <p>Example 2:</p>
  
  <pre><code>isLastInMonth = False
  if monthrange(2015, 5)[1] == today.day:
      isLastInMonth = True
  </code></pre>
  
  <p><strong>Edit:</strong></p>
  
  <p>It seems like you prefer a third one:</p>
  
  <p>Example 3:</p>
  
  <pre><code>isLastInMonth = monthrange(2015, 5)[1] == today.day
  </code></pre>
  
  <p>Some Answers refer to my old example:</p>
  
  <p>Example 1:</p>
  
  <pre><code>if fooA == True:
      fooB = True
  else:
      fooB = False
  </code></pre>
  
  <p>Example 2:</p>
  
  <pre><code>fooB = False
  if fooA == True:
      fooB = True
  </code></pre>