sampling python from list
# Python3 program to demonstrate
# the use of sample() function .
# import random
from random import sample
# Prints list of random items of given length
list1 = [1, 2, 3, 4, 5]
#format: sample(the_list,number_of_samples)
print(sample(list1,3))