title: How do I simulate biased die in python?
body: <p>I want to simulate N-sided biased die? </p>
  
  <pre><code>def roll(N,bias):
       '''this function rolls N dimensional die with biasing provided'''
       # do something
       return result
  
  &gt;&gt; N=6
  &gt;&gt; bias=( 0.20,0.20,0.15,0.15,0.14,0.16,)
  &gt;&gt; roll(N,bias)
     2
  </code></pre>