how to generate list of random numbers in python code example
Example 1: random number pythn
import random
n = random.randint(0,22)
print(n)
# Output: 2
Example 2: 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)