list,string,tuple,dictionary之间的转换

 

类型 String List tuple dictionary
String - list(str), str.split() tuple() -
List ‘’.join(list_name) - tuple() dict(list)
tuple - list(tuple) - dict(tuple)
dictionary - dic.items() tuple (dic.items())

转自:https://blog.csdn.net/YQ1228/article/details/78542035

相关文章:

  • 2021-11-26
  • 2021-06-10
  • 2022-12-23
  • 2021-09-14
  • 2022-12-23
  • 2021-06-26
猜你喜欢
  • 2021-10-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案