数字、字符串、元组是不可变的 列表、字典、集合是可变的。 可变不可变类型中引用的关系 不可变类型 list1 =(1,2,3) list2 =(1,2,3) print(list1 is list2) # 输出结果为True 说明list1和list2指向的是同一个地址 可变类型 list1 =[1,2,3] list2 =[1,2,3] print(list1 is list2) # 输出结果为False 说明指向的不是同一个地址