Skip to content

Latest commit

 

History

History
9 lines (9 loc) · 296 Bytes

迭代器_20170716.md

File metadata and controls

9 lines (9 loc) · 296 Bytes
  • 关键字
    Iterable Iterator iter
  • Iterable
    able 后缀表示可...的,有什么能力的
    Iterable 就表示可使用 for 循环迭代的
  • Iterator
    迭代器,类似生成器,通过 next() 获取不断获取元素
  • iter() 函数
    可以获得 Iterable 对象的 Iterator