skribe, Python folks: in random.choices, does it always return the k value of choices? ie.
names = random.choices(names_list, k=20)
It would return 20 random names from names_list (including duplicates). What if there's not enough names in names_list?
I have some code that regularly returns less. I'm trying to determine if it's a Django problem. Similar (non-Django) code doesn't have this issue, hence my confusion.
Add comment