1
GTim 2018-09-06 21:24:40 +08:00
楼主多试一试几次
即使你看到了十次都是有序的,也不要相信,`set` 是无序的 `set` 是无序的 `set` 是无序的 |
2
PythonAnswer 2018-09-06 21:32:39 +08:00
楼主多看文档
5.4. Sets Python also includes a data type for sets. 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, a data structure that we discuss in the next section. |
3
drawstar 2020-01-02 11:13:19 +08:00
@PythonAnswer 从文档能看出啥?无序的?
|