How do you pick "x" number of unique numbers from a list in Python?
I need to pick out "x" number of non-repeating, random numbers out of a list. For example: all_data = [1, 2, 2, 3, 4, 5, 6, 7, 8, 8, 9, 10, 11, 11, 12, 13, 14, 15, 15] How do I pick out a list like [2, 11, 15] and not [3, 8, 8]?
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.