If you want to get n random elements from a list, use random.sample.
The code above shows how this method works.
Link to the source code.