python-collections模块小结(namedtuple、defaultdict、deque等)

collections中有不少模块,包括tuple这个是最基础的数据结构,而一些经常使用模块好比namedtuple、defaultdict等能让程序更加简洁明了,易读效率高,了解一下。python 拆包: tuple=("周",24,175) # 换成List也能够拆包 name, age, height =tuple   name,*other =tuple  print(name,other
相关文章
相关标签/搜索