0
is there a chance to repeat the item while I'm using random.sample
is there a chance to repeat the item while I'm using random.sample
1 Respuesta
+ 1
From the Python Docs:
random.sample(population, k)
Return a k-length list of unique elements chosen from the population sequence or set.
If the population contains repeats, then each ocurrence is a possible selection in the sample.
https://docs.python.org/3/library/random.html#random.sample