zoukankan      html  css  js  c++  java
  • python __builtins__ enumerate类 (21)

    21、'enumerate', 用于将一个可遍历的数据对象(如列表、元组或字符串)组合为一个索引序列,同时列出数据和数据下标,一般用在 for 循环当中。

    class enumerate(object)
     |  enumerate(iterable[, start]) -> iterator for index, value of iterable
    # 返回一个索引和值的迭代器 | | Return an enumerate object. iterable must be another object that supports | iteration. The enumerate object yields pairs containing a count (from | start, which defaults to zero) and a value yielded by the iterable argument. | enumerate is useful for obtaining an indexed list: | (0, seq[0]), (1, seq[1]), (2, seq[2]), ... | | Methods defined here: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __iter__(self, /) | Implement iter(self). | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | __next__(self, /) | Implement next(self). | | __reduce__(...) | Return state information for pickling.

      

  • 相关阅读:
    RestKit ,一个用于更好支持RESTful风格服务器接口的iOS库
    Pop–实现任意iOS对象的任意属性的动态变化
    界面传值失败
    UIImagePickerController
    NSURLSession
    iOS图标尺寸
    cocoapods
    duplicate symbol _OBJC_IVAR
    MAC升级openssl
    Mac
  • 原文地址:https://www.cnblogs.com/gundan/p/8257171.html
Copyright © 2011-2022 走看看