Prioritizing first items in a list (Random & Probability Distribution)

Viewed 128

I have a list of sorted elements. First elements are supposed to be prioritized in contrast to last elements. Currently, I am just using random.choice(foo) to select items from my list.

The algorithm I am writing would be a lot more efficient with a different probability distribution (described above). Unfortunately, I am not sure how to implement it

1 Answers
Related