You can use one of the functions from Python's random module to generate random numbers and place those in a list. Lists have a sort method you can use to sort the elements within.
Code:
import random
numbers = []
for i in range(1,10):
number = random.randint(1,10)
numbers.append(number)
print numbers
numbers.sort()
print numbers