摘要: 内置函数:filter() 先看看filter的函数文档 | filter(function or None, iterable) --> filter object | | Return an iterator yielding those items of iterable for which 阅读全文
posted @ 2016-03-10 23:04 林间 阅读(888) 评论(1) 推荐(0) 编辑
摘要: 一、通过lambda语句创建匿名函数 >>> def fun1(x): return x * 2 + 1 >>> lambda x:x * 2 + 1 <function <lambda> at 0x000000F732724400> >>> g = lambda x:x * 2 + 1 >>> g 阅读全文
posted @ 2016-03-10 22:34 林间 阅读(345) 评论(0) 推荐(0) 编辑