how to generate a random series of length 10 in python code example Example: get n random numbers from x to y python import random random.sample(range(31), 10)