title: Please assist in understanding random.choices() weighting
body: <p>Hoping to get some help on understanding the weighting using random.choices()</p>
  <pre><code>import random
  k = 100
  
  population = random.choices(
  population=[['a'],['b'],['c'],['d'],['e'],['f'],['g'],['h'], ['i'],['j']],
  weights=[10, 10, 10, 10, 10, 10, 10, 10, 10, 10],
  k=k)
  
  print(population.count(['a'])/k,
  population.count(['b'])/k,
  population.count(['c'])/k,
  population.count(['d'])/k,
  population.count(['e'])/k,
  population.count(['f'])/k,
  population.count(['g'])/k,
  population.count(['h'])/k,
  population.count(['i'])/k,
  population.count(['j'])/k)
  
  </code></pre>
  <p>So I have been through several of the answers on this and my understanding is that this should be the formula when calculating the weighting for each string:</p>
  <p>Total Weight is 100</p>
  <p>a is 10/100 or 10%</p>
  <p>b is 10/100 or 10%
  and so on..</p>
  <p>So do I have that correct?</p>
  <p>Seconsly when testing the code above I do not get a break down that matches the actual weighting that I would expect, of roughly every single letter showing up.</p>
  <p>Could someone please explain why to the Python newbie in as simple terms as possible?</p>