map(function, sequence)
2015-07-19 14:18
363 查看
map(function, sequence) :对sequence中的item依次执行function(item),见执行结果组成一个List返回:
>>> lt = range(10) >>> lt [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> def Pow(x): ... return pow(x,2) ... >>> map(Pow,lt) [0, 1, 4, 9, 16, 25, 36, 49, 64, 81] >>>
相关文章推荐
- Android SystemUI源代码分析和修改
- Making Sequences is Fun373B
- RequireJS实例分析
- hdu5286 wyh2000 and sequence 分块处理
- UITableViewQQ列表效果
- Number Sequence
- 数学 Codeforces Round #219 (Div. 2) B. Making Sequences is Fun
- 20150719 Navy blue is my color. You will describe the way people look
- 无限循环滚动大图(UICollectionView)
- runAllManagedModulesForAllRequests="true" 的思考
- IOS 中设置UITextView 显示文本的光标
- HDU 3836 Equivalent Sets(强连通分量 Tarjan缩点)
- 使用fastcgi_finish_request提高页面响应速度
- 图片水印(UIImage类目)
- [LeetCode]Implement Stack using Queues
- ZOJ 1926 Guessing Game
- HDU 2604 Queuing
- 转:抗锯齿方法两种(其一:paint.setAntiAlias(ture);paint.setBitmapFilter(true))
- Linking different libraries for Debug and Release builds in Cmake on windows?
- OpenCV Access pixel value