在執行 foreach 迴圈時訪問索引的 pythonic 方法是使用內建函式 enumerate() 。 enumerate() 向可迭代集合中的每個元素新增索引。然後,你可以使用 list() ...
確定! 回上一頁