#!/usr/bin/python
import random
from random import choice
for k in range(10): # number of row to print
pick = list(range(1,41)) # size of pool 40 +1
numbers = []
i=1
for j in range(5):
num = random.choice(pick)
pick.remove(num) # remove selected number from pool
numbers.append(num)
i=i+1
print sorted(numbers) # return sorted row
All ideas about improving this code are welcome.--cheers