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