摘要: Python学习 map函数:接收两个参数,一个是函数,一个是Iterable(迭代,可以理解为连续的一组数据,可以遍历的数据,包含内置的string、list、dict、tuple) 例子: >>def f(x): return x*x >>>r=map(f,[1,2,3]) >>>list(r) 阅读全文
posted @ 2017-11-10 14:49 Qiangcm 阅读(239) 评论(0) 推荐(0) 编辑