Sep-16-2022, 06:12 PM
(This post was last modified: Sep-16-2022, 06:15 PM by Gribouillis.)
random.choices()
was added in Python 3.6 because of a request to add a weights
parameter in the random.choice()
function. Read What's new in Python 3.6. random.sample()
does not have a weights parameter.Read also the discussion in bpo-18844