algorithm-in-python/codes/dataStructure/primers.py

23 lines
623 B
Python
Raw Normal View History

2018-07-08 23:28:29 +08:00
''' mbinary
#########################################################################
# File : primers.py
# Author: mbinary
# Mail: zhuheqin1@gmail.com
# Blog: https://mbinary.coding.me
# Github: https://github.com/mbinary
# Created Time: 2018-05-19 23:06
# Description:
#########################################################################
'''
def get(n)
li = [i for i in range(2,n)]
i = 1
while i <len(li):
prod =2 * li[i]
while prod <=li[-1]:
if prod in li:
li.remove(prod)
prod+=li[i]
i+=1
2018-07-08 16:41:55 +08:00
return li