未验证 提交 29ae4add 编写于 作者: 两点水 提交者: GitHub

Update tuple.md

上级 1a978481
......@@ -4,7 +4,7 @@
tuple 不可变是指当你创建了 tuple 时候,它就不能改变了,也就是说它也没有 append(),insert() 这样的方法,但它也有获取某个索引值的方法,但是不能赋值。那么为什么要有 tuple 呢?那是因为 tuple 是不可变的,所以代码更安全。所以建议能用 tuple 代替 list 就尽量用 tuple 。
## 1、创建 tuple(元) ##
## 1、创建 tuple(元) ##
元组创建很简单,只需要在括号中添加元素,并使用逗号隔开即可。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册