python, 用filter实现素数
摘要:# _*_ coding:utf-8 _*_ #step1: 生成一个序列def _odd_iter(): n = 1 while True: n = n + 1 yield n #Step2: 定义筛选函数def _not_divisible(n): return lambda x: x % n
阅读全文
posted @ 2017-12-26 19:18
posted @ 2017-12-26 19:18
posted @ 2017-12-21 19:27
posted @ 2017-12-21 18:06