L = [] for X in range(10): N = 3*X+2 if N%2 == 1: L = L + [N] print L