>>> Y=[x**2 for x in X if x**2<30] >>> Y [1, 25] >>> Y=[x**2 for x in X if x<10] >>> Y [1, 25, 49]