(六)python 設計模式 --- 迭代器模式

訪問一個數據容器的內容而無需暴露它的內部表示,支持對該數據容器的多種遍歷python # -*- coding: utf-8 -*- def count_to(count): # 1.內部以列表形式存儲 該數據 _numbers = ["one", "two", "three", "four", "five"] # 2.內部以 IO形式 及時請求數據 _number
相關文章
相關標籤/搜索