Python中,tuple和list均为内置类型,
以list作为参数将tuple类初始化,将返回tuple类型
tuple([1,2,3]) #list转换为tuple
以tuple作为参数将list类初始化,将返回list类型
list((1,2,3)) #tuple转换为list
更多内容
Python中,tuple和list均为内置类型,
以list作为参数将tuple类初始化,将返回tuple类型
tuple([1,2,3]) #list转换为tuple
以tuple作为参数将list类初始化,将返回list类型
list((1,2,3)) #tuple转换为list
更多内容