map函数学习
来源:互联网 发布:java安装时出现错误 编辑:程序博客网 时间:2024/06/05 05:33
函数定义:
map(function, iterable, ...)Apply function to every item of iterable and return a list of the results. If additional iterable arguments are passed, function must take that many arguments and is applied to the items from all iterables in parallel. If one iterable is shorter than another it is assumed to be extended withNoneitems. If function isNone, the identity function is assumed; if there are multiple arguments, map() returns a list consisting of tuples containing the corresponding items from all iterables (a kind of transpose operation). The iterable arguments may be a sequence or any iterable object; the result is always a list.
def abc(a, b, c):... return a*10000 + b*100 + c... >>> list1 = [11,22,33]>>> list2 = [44,55,66]>>> list3 = [77,88,99]>>> map(abc,list1,list2,list3)[114477, 225588, 336699]
函数和可迭代对象
阅读全文
0 0
- perl map函数学习
- map函数学习
- 【python学习笔记】Map函数
- c++ STL map函数函数学习笔记
- map函数的学习和使用
- java学习# map 的哈希函数
- map,zip,reduce,lambda函数学习笔记
- Python map,filter,reduce函数学习
- [Python学习]map与reduce函数
- Map函数的学习与理解
- map 函数
- Map 函数
- map函数
- map函数
- map函数
- map()函数
- 【map函数】
- map函数
- 快速、插入、冒泡排序,二分查找
- CentOS7 安装ARM Linux交叉编译环境
- mysql中的模糊查询
- 代理模式 | Proxy Pattern
- 图论小结(最小生成树)
- map函数学习
- X问题
- RecyclerView的ItemAnimator
- 搜索引擎选择: Elasticsearch与Solr
- SYN Flood攻击及防御方法
- json学习
- springboot学习之--Logback日志详解(二)
- 神奇药水
- UVA