import random
random.seed()
print(random.randrange(1, 10, 1)) # generate a number between [1, 10)
print(random.randint(1, 10)) # generate an integer between [1, 10]
print(random.choice(range(10))) # get a random integer from the list
l = list(range(10)) # [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
random.shuffle(l) # shuffle the list
print (l) # [6, 1, 2, 4, 5, 7, 3, 9, 0, 8]
print (random.sample(range(10), 4)) # [4, 2, 1, 6], sample size should less than the size of the list
import random
random.seed()
print(random.random()) # generate a random float number between [0, 1)
print(random.uniform(1, 10)) # generate a random float number between [1, 10] with uniform distribution
print(random.gauss(0, 1)) # generate a float number with gauss distribution