for j in range(1, 20, 3): print(j if j & 1 else j + 1)
Standard input is empty
1 5 7 11 13 17 19
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!