Python基础(8)素数输出

s=[]
for a in range(101,201):
    mark=True
    for b in range(2,a):
        if a%b==0:
            mark=False
            break
    if mark==True:
        s.append(a)
print s
print len(s)
        

原文地址:https://www.cnblogs.com/jietingting/p/7076870.html