a =1, b = 2用一行代码改变a,b值
a = 1 b = 2 a,b = b,a print(a,b)
#元祖 如果元祖里面只有一个元素且不加,那此元素是什么类型,就是什么类型。
# tu1 = (1) # tu2 = (1,) # print(tu1,type(tu1)) # print(tu2,type(tu2)) # tu1 = ([1]) # tu2 = ([1],) # print(tu1,type(tu1)) # print(tu2,type(tu2))
#去重
# li = [1,2,33,33,2,1,4,5,6,6] # set1 = set(li) # # print(set1) # li = list(set1) # print(li) # s1 = {1,2,3} # print(s1,type(s1))