from random import randintdef odd(n): return n % 2allNums = []for eachNum in range(9): allNums.append(randint(1, 99))print filter(odd, allNums)