import math print([x for x in range(20) if [i for i in range(2,x-1) if x % i == 0] == []])
Standard input is empty
[0, 1, 2, 3, 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!