samedi 8 mai 2021

how to pick a value from a list where the number in the list is its % chance of being picked

Essential, what i have is a list like this: Thislist = [20, 34, 46]

And i want it so when randomly picking a number, the first number will have a 20% chance of being picked, the 2nd number will have a 34% chance of being picked, and the 3rd number will have a 46% chance of being picked.




Aucun commentaire:

Enregistrer un commentaire