random.sample: Get n Random Elements From a List

random.sample: Get n Random Elements From a List

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.

Scroll to Top

Work with Khuyen Tran

Work with Khuyen Tran