摘要: 0. 阅读目录 迭代器 (Iterator) 生成器 (Generator) 1. 迭代器 (Iterator) 特点: 有关代码: it = iter(the_list) #获得迭代器对象 it.next() or next(it) #访问下一个元素 enumerate(it) #获得enumer 阅读全文
posted @ 2016-07-27 22:09 AntoniaWakeUp 阅读(181) 评论(0) 推荐(0)
摘要: 0. 阅读目录 List Dictionary Tuple String Reference 1. LIST the_list = [] #新建一个空列表 the_list[i] = x #指定列表中i位置项的值 the_list[s:] #提取从s位置开始的子列表 the_list[s:t+1] 阅读全文
posted @ 2016-07-26 22:24 AntoniaWakeUp 阅读(297) 评论(0) 推荐(0)