标签:
A set is an unordered collection with no duplicate elements. Basic uses include membership testing and eliminating duplicate entries. Set objects also support mathematical operations like union, intersection, difference, and symmetric difference.
Curly braces or the set() function can be used to create sets. Note: to create an empty set you have to use set(), not {}; the latter creates an empty dictionary.
“集合”是一种没有重复元素的无序集合,可以用大括号或set()来创建,但空集合只能用set()来创建,{}会创建另一种数据类型:字典。
标签:
原文地址:http://www.cnblogs.com/starnix/p/4593604.html