python元组空字符串
时间: 2023-10-12 22:08:15 浏览: 100
Python 基础课程《6.列表、元组、字符串》
在Python中,元组是一种不可变的数据类型,可以包含任意类型的元素。如果想要创建一个空的元组,可以使用空的圆括号来表示,例如:
t = ()
print(t) #[]
这样就创建了一个空的元组并打印出来。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [Python 元组转字符串或列表](https://blog.csdn.net/turkeym4/article/details/104928774)[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^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [python 元组转字符串](https://blog.csdn.net/weixin_30254435/article/details/97344098)[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^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文