tuple转list
时间: 2023-09-04 17:13:48 浏览: 188
要将tuple转换为list,可以使用内置的list()函数。该函数接收一个tuple作为参数,并返回一个具有相同元素的list。例如,如果有一个tuple_var的元组变量,你可以使用list_var = list(tuple_var)将其转换为列表。这样,你就可以对列表进行添加、删除等操作了。\[1\]\[2\]
#### 引用[.reference_title]
- *1* *3* [python中元组(tuple)用法总结](https://blog.csdn.net/weixin_36250487/article/details/79626454)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [Python里面如何实现tuple和list的转换?](https://blog.csdn.net/zy1992As/article/details/131184782)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文