Advertisement
Guest User

Untitled

a guest
May 26th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. doubles_by_3 = [x * 2 for x in range(1, 6) if (x * 2) % 3 == 0]
  2.  
  3. even_squares = [x ** 2 for x in range(1, 12) if (x ** 2) % 2 == 0]
  4.  
  5. cubes_by_four = [x**3 for x in range(1,11) if (x ** 3) %4 == 0]
  6.  
  7. print(doubles_by_3)
  8. print (even_squares)
  9. print(cubes_by_four)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement