title: True or false output based on a probability
body: <p>Is there a standard function for Python which outputs True or False probabilistically based on the input of a random number from 0 to 1?</p>
  
  <p>example of what I mean:</p>
  
  <pre><code>def decision(probability):
      ...code goes here...
      return ...True or False...
  </code></pre>
  
  <p>the above example if given an input of, say, 0.7 will return True with a 70% probability and false with a 30% probability</p>