a guest Feb 20th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def premiers(n):
  2.     li = list(range(2,n+1))
  3.     for k in range(0,n-1):
  4.         for i in range(k+1,n-1):
  5.             if li[i] % li[k] == 0:
  6.                 li[i]=0
  7.     return li
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand