JavaShuo
欄目
標籤
python中,tuple裏的list中的元素爲何能夠變,tuple到底可不可變?
時間 2020-07-17
標籤
python
tuple
list
元素
爲何
能夠
到底
可不
可變
欄目
Python
简体版
原文
原文鏈接
衆所周知,tuple與list的區別就是tuple是不可變的,是爲了讓程序更安全,tuple能夠看成dict的key可是list不行。但tuple並非徹底不可變的,以下所示,tuple中的list的元素就是能夠修改的。python >>> a = 1 >>> b = 2 >>> c = [3,4,5] >>> d = (a,b,c) >>> d (1, 2, [3, 4, 5]) >>> d[2]
>>阅读原文<<
相關文章
1.
Python(可變/不可變類型,list,tuple,dict,set)
2.
python中的List和tuple
3.
Python中的list和tuple
4.
Python中的List,Tuple,Dic,Set
5.
python中元組tuple
6.
python中list集合和tuple元組
7.
Python中的「可變」和「不可變」
8.
小議list,tuple,dict,set對象的可變性
9.
Python中元組tuple操作
10.
Python中的list,tuple,dict和set 教程
更多相關文章...
•
Scala 函數 - 可變參數
-
Scala教程
•
PHP 可用的函數
-
PHP參考手冊
•
SpringBoot中properties文件不能自動提示解決方法
•
C# 中 foreach 遍歷的用法
相關標籤/搜索
list&tuple
tuple
可變
不可改變
不可變
c#tuple
map&tuple
可變化
可改變
可變性
Python
Spring教程
Docker教程
Docker命令大全
註冊中心
阿里雲
0
分享到微博
分享到微信
分享到QQ
每日一句
每一个你不满意的现在,都有一个你没有努力的曾经。
最新文章
1.
網絡層協議以及Ping
2.
ping檢測
3.
爲開發者總結了Android ADB 的常用十種命令
4.
3·15 CDN維權——看懂第三方性能測試指標
5.
基於 Dawn 進行多工程管理
6.
缺陷的分類
7.
阿里P8內部絕密分享:運維真經K8S+Docker指南」,越啃越香啊,寶貝
8.
本地iis部署mvc項目,問題與總結
9.
InterService+粘性服務+音樂播放器
10.
把tomcat服務器配置爲windows服務的方法
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
1.
Python(可變/不可變類型,list,tuple,dict,set)
2.
python中的List和tuple
3.
Python中的list和tuple
4.
Python中的List,Tuple,Dic,Set
5.
python中元組tuple
6.
python中list集合和tuple元組
7.
Python中的「可變」和「不可變」
8.
小議list,tuple,dict,set對象的可變性
9.
Python中元組tuple操作
10.
Python中的list,tuple,dict和set 教程
>>更多相關文章<<