python元组长度
时间: 2023-08-17 17:13:30 浏览: 119
回答: 在Python中,可以使用len()函数来获取元组的长度。例如,如果有一个元组tup=("nihao","wohao","dajiahao"),可以使用len(tup)来获取元组的长度。\[2\]
#### 引用[.reference_title]
- *1* *3* [python基础入门(7)之元组](https://blog.csdn.net/qq_25990967/article/details/122170080)[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^insertT0,239^v4^insert_chatgpt"}} ] [.reference_item]
- *2* [python基础——数据结构之元组](https://blog.csdn.net/W981113/article/details/123964598)[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^insertT0,239^v4^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文