#判断是否为质数 # def pri(n,m): # ret = [] # for i in range(n,m+1): # for j in range(2,i): # if i % j == 0: # b = i # ret.append(b) # return ret # a = set(range(100,201)) # print(a-set(pri(100,200))) # def pri(n,m): # ret = [] # for i in range(n,m+1): # for j in range(2,i): # if i % j == 0: # break # else: # ret.append(i) # return ret # print(pri(100,200))
原文:https://www.cnblogs.com/libragyf/p/12110868.html