Python - enumerate
来源:互联网 发布:串口软件 编辑:程序博客网 时间:2024/05/17 21:06
如果想获取一个列表的偏移量和元素,那么可以用enumerate:
e.g
alist = ['I','am','learning','python']enumerateTest=enumerate(alist)blist = list(enumerateTest)print enumerateTestprint blist
返回:
<enumerate object at 0x022C5738>
[(0, 'I'), (1, 'am'), (2, 'learning'), (3, 'python')]
0 0
- python enumerate
- enumerate python
- python enumerate
- Python-enumerate
- Python Enumerate
- Python - enumerate
- python enumerate()
- python:enumerate
- Python enumerate
- python-enumerate()
- python: enumerate
- python enumerate
- python enumerate
- enumerate python
- python --enumerate用法
- python中enumerate用法
- python enumerate 用法
- python enumerate 用法
- java中的冒泡排序
- COPY, RETAIN, ASSIGN , READONLY , READWRITE,STRONG,WEAK,NONATOMIC整理
- Google 发布 Android 性能优化典范
- 手机APP三年内将彻底消失,以后全靠H5了
- 08_Flink Streaming window
- Python - enumerate
- python 三元条件判断的3种实现方法
- leetcode 38 Count and Say C++
- OBIEE RPD开发
- [转载记录]pkg-config工具理解
- 如何学习OpenGL
- JavaSE大纲图集
- 数据结构笔记整理第9章:数据结构规律类识点(1)
- 網絡爬蟲,防止被ban