choices

random.choices(population, weights = None, cum_weights = None, k=1) -> list

Returns test (random).

population??
weights??
cum_weights??
k??

REMARKS
* You can use the random.choice function to

import random 

_letters = ['A','B','C','D','E']
print(random.choices(_letters, k=2)) # 2 draws with replacement

© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited Top