📜  为大输入python代码示例在给定范围内查找素数

📅  最后修改于: 2022-03-11 14:47:23.459000             🧑  作者: Mango

代码示例1
import math
print 2
for num in range(3,101,2):
    if all(num%i!=0 for i in range(3,int(math.sqrt(num))+1, 2)):
        print (num)