python 类型转换
#list-->set 列表转换set
l1 = [1,2,3,4,5,3,4,5]
s1 = set(l1)
#tuple-->set 元组转换set
t2 = (1,2,3,4,3,2)
s2 = set(t2)
#set-->list set转换列表
s3 = {1,2,3,4}
l3 = list(s3)
print(l3)
#set-->tuple set转换元组
s4 = {2,3,4,5}
t4 = tuple(s4)
print(t4)
#list-->set 列表转换set
l1 = [1,2,3,4,5,3,4,5]
s1 = set(l1)
#tuple-->set 元组转换set
t2 = (1,2,3,4,3,2)
s2 = set(t2)
#set-->list set转换列表
s3 = {1,2,3,4}
l3 = list(s3)
print(l3)
#set-->tuple set转换元组
s4 = {2,3,4,5}
t4 = tuple(s4)
print(t4)