Python collections模塊

collections模塊 Python的collections模塊包含了許多實用的集合類。python namedtuple namedtuple能夠定義一個簡單的類,比直接定義一個類更簡單,且減小了初始化類的不少初始化方法,因此速度更快。web from colletions import namedtuple User = namedtuple('User',['name','age','h
相關文章
相關標籤/搜索