Nov-07-2018, 12:23 PM
Hi Guys,
Suppose I have a list of arbitrary numbers (23, 2, 49, 100, 101) and from this list, I want to randomly pick 3 unique numbers and store them inside a new list. I can’t use random.sample() function, as the function will generate the numbers based on a range of sequence numbers.
Can you please advise me on how to pick 3 unique numbers from a list of arbitrary numbers, and store them in a new list?
Thank you.
Suppose I have a list of arbitrary numbers (23, 2, 49, 100, 101) and from this list, I want to randomly pick 3 unique numbers and store them inside a new list. I can’t use random.sample() function, as the function will generate the numbers based on a range of sequence numbers.
Can you please advise me on how to pick 3 unique numbers from a list of arbitrary numbers, and store them in a new list?
Thank you.