# 将列表转化为元组
lst=[11,22,33]
t=tuple(lst)
print(t,type(t))
# 打印结果:(11, 22, 33) <class 'tuple'>

tu=(11, 22, 33)
l=list(tu)
print(l,type(l))
# 打印结果:[11, 22, 33] <class 'list'>

 

相关文章:

  • 2022-12-23
  • 2022-01-16
  • 2022-12-23
  • 2021-12-27
  • 2021-09-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2021-10-23
  • 2022-12-23
  • 2021-12-25
  • 2021-10-23
相关资源
相似解决方案