标签:append for lse class += span app list ret
prime_list=[2] def is_prime(num): i=0 n=prime_list[i] while num//n>=n: if num%n==0: return False i+=1 n = prime_list[i] return True def get_prime(num): for i in range(3,num+1): if is_prime(i): prime_list.append(i) get_prime(1000) for i in prime_list: print(i)
标签:append for lse class += span app list ret
原文地址:https://www.cnblogs.com/zxmbky/p/10281569.html