title: randomly sort a list with bias
body: <p>I have a list as follows:<br/></p>
  
  <pre><code>i = [
          {'id': '1', 'P': 0.5},
          {'id': '2', 'P': 0.4},
          {'id': '3', 'P': 0.8},
          ...
          {'id': 'x', 'P': P(x)}
      ]
  </code></pre>
  
  <p>When I do the following:</p>
  
  <pre><code>i.sort(key=lambda x: x['P'], reverse=True)
  </code></pre>
  
  <p>The list gets sorted based on P where the element with the largest P is in front. but what if I want to make it seem randomized so that even a element with a small P value (with very small probability) can be the first item in the list?<br>
  Is it possible to implement that using the sort() function or do I have to write my own?</p>