摘要: def prime(num): for i in range(2, num): if num % i == 0: # 能被1之外的任意个数整除的即为非素数,返回False,将被filter函数过滤掉 return False return Trueprint'prime: ', filter(pri 阅读全文
posted @ 2017-06-07 23:17 随便了888 阅读(9008) 评论(0) 推荐(0) 编辑