coding random number generator in python code example
Example 1: n random numbers python
>>> import random
>>> random.sample(range(1, 100), 3)
[77, 52, 45]
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)