list1=[2,3,8,4,9,5,6]list2=[5,6,10,17,11,2]s=sorted(set(list1+list2))print(s)+
defdistFunc1(a):"""使用集合去重"""a=list(set(a))print(a)defdistFunc2(a):...
A,B中相同元素:print(set(A)&set(B))A,B中不同元素:print(set(A)^set(B))
l1=[&039;b&039;,&039;c&039;,&039;d&039;,&039;c&039;,&039;a&039;,&039;a&039;]l2=list(set(l1))print(l2)用list类的sor...
importrandomalist=[1,2,3,4,5]random.shuffle(alist)print(alist)