demo_ref_random_sample.py:
import random mylist = ["apple", "banana", "cherry"] print(random.sample(mylist, k=2))
C:\Users\My Name>python demo_random_sample.py