Python 元组
来源:互联网 发布:计算机与网络杂志 编辑:程序博客网 时间:2024/05/16 17:19
Python的元组(tuple)与列表(list)类似,不同之处在于元组的元素不能修改。
- 使用 ()创建空元组
- 在尾部使用一个逗号创建单元素元组如: ‘a’, or (‘a’,)
- 使用逗号分隔 如:’a’, ‘b’, ‘c’ or (‘a’, ‘b’, ‘c’)
- 使用 tuple() 函数 创建元组
tup1 = ()tup2 = ('a',)tup3 = ('a','b','c')tup4 = tuple('abc')tup5 = tuple([7,8,9])tup6 = 'a','b','c'
0 0
- Python 元组
- Python 使用元组
- Python组元陷阱
- python元组学习
- Python:元组函数
- Python 元组 小结
- PYthon中的元组
- python学习-元组
- python 元组
- Python 元组
- python 元组
- python 元组
- Python元组类型
- Python 元组
- python元组
- Python元组
- python--列表,元组
- Python入门教程--元组
- Android MVP模式简单例子实战
- 跨平台APP----对Native/Hybrid/Web APP三种开发模式的分析(系列一)
- python-001抓图片
- java之常用方法
- 14-CSS背景与列表
- Python 元组
- 在屏幕上输出菱形
- [Android]ExpandableListView 在适配器中isChildSelectable方法返回了true,子目录点击仍然无响应解决方法
- Mac终端常用命令
- python的字典常用方法
- debian Call to undefined function curl_init
- 【洛谷P2024】食物链
- 文本数据集的读写和简单处理
- 利用sharedPreference来保存我们的登录信息