Answer the question
In order to leave comments, you need to log in
How to make a random selection in python, but with a certain probability?
Hello.
There is a list: list = [q1, q2, q3]
You need to choose one value from this list (of type random.choice(list), but with different probabilities for selection. For example, with probabilities:
q1 = 0.2
q2 = 0.3
q3 = 0.5
Is it possible, and if so, how can it be done?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question