python:enumerate 函數

說明 enumerate()是python的內置函數:html 對於一個可迭代的(iterable)/可遍歷的對象(如列表、字符串),enumerate將其組成一個索引序列,利用它能夠同時得到索引和值 多用於在for循環中獲得計數 返回的是一個enumerate對象 語法 enumerate(sequence, [start=0])python sequence -- 一個序列、迭代器或其餘支持迭
相關文章
相關標籤/搜索