什么是Java Collections Framework的Python等价物? [英] What is/are the Python equivalent(s) to the Java Collections Framework?
本文介绍了什么是Java Collections Framework的Python等价物?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Java集合框架类似于C ++标准模板库:用于表示和操作集合(将多个元素分组为一个单元的对象)的统一体系结构."
The Java Collections Framework is like the C++ Standard Template Library: "a unified architecture for representing and manipulating collections (objects that group multiple elements into a single unit)."
http://java.sun.com/docs/books/tutorial/collections/intro/index.html
推荐答案
Other than the built-ins you might what to check out collections.
>>> import collections
>>> dir(collections)
['Callable', 'Container', 'Hashable', 'ItemsView', 'Iterable', 'Iterator', 'KeysView', 'Mapping', 'MappingView', 'MutableMapping', 'MutableSequence', 'MutableSet', 'Sequence', 'Set', 'Sized', 'ValuesView', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '_abcoll', '_iskeyword', '_itemgetter', '_sys', 'defaultdict', 'deque', 'namedtuple']
>>>
这篇关于什么是Java Collections Framework的Python等价物?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文