how to generate a random number list in python code example
Example 1: python generate list of random numbers
import random
randomlist = []
for i in range(0,5):
n = random.randint(1,30)
randomlist.append(n)
print(randomlist)
Example 2: python random generator from list
import random
n = random.random()
print(n)