random.sample
The random.sample function returns a list of k elements extracted without repetition of the sequence population. That is, it returns a sample of that sequence. If population contains repeated elements, each of them can be chosen separately as part of the sample.