将列表转换为一组更改元素顺序
最近,我注意到当我转换一个list到set元素的顺序被更改,并按字符进行排序。
list
set
考虑这个例子:
x=[1,2,20,6,210]print x # [1, 2, 20, 6, 210] # the order is same as initial orderset(x)# set([1, 2, 20, 210, 6]) # in the set(x) output order is sorted
我的问题是-
牧羊人nacy
慕勒3428872
有只小跳蛙
相关分类