lalala33rfs

Untitled

Nov 17th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. import math
  2.  
  3.  
  4. def primes(n):
  5.     return [i for i in range(2, n + 1) if not [j for j in range(2, math.floor(math.sqrt(i) + 1)) if i % j == 0]]
  6.  
  7.  
  8. if __name__ == '__main__':
  9.     print(primes(10))
Advertisement
Add Comment
Please, Sign In to add comment