list random in python code example
Example 1: python choose sample from list with replacement
import random
random.choices(list, k = 4)
Example 2: python random list
import random
randomlist = []
for i in range(0,5):
n = random.randint(1,30)
randomlist.append(n)
print(randomlist)