title: Python printing statements for a biased coin flip?What does the last 2 lines mean?
body: <p>So I got these codes that for printing the statements but I don't get the purpose of the last two lines of the if loop?
  from random import random</p>
  
  <pre><code>def flip(bias):
      """
      Flip a coin once.
      `bias` is the likelihood of the result being heads, 0. &lt;= bias &lt;= 1.
      Returns True for heads or False for tails
      """
      return random() &lt; bias
  
  def main():
      bias = float(input("What bias do your coins have? "))
      count = {False: 0, True: 0}
      for i in range(1, 4):
          toss = flip(bias)
          count[toss] += 1
          print("Coin flip {} has a value of heads: {}".format(i, toss))
      print("Final result: {} heads, {} tails".format(count[True], count[False]))
  
  if __name__ == "__main__":
      main()
  </code></pre>
  
  <p>Thanks in advance.</p>