python 中list dict tuple的比较
来源:互联网 发布:实施网络攻击的前提 编辑:程序博客网 时间:2024/05/17 03:07
转自于 http://hi.baidu.com/kxw102/blog/item/6c36404789f1cc066a63e598.html
python的list,dict,tuple比较和应用
总结一下:
list是顺序的,可变的。
dictrionary是无顺序的,可变的
tuple是顺序的,不可变的。>>> a=((4,"abc"),(2,"efg"),(3,"ghi"))
>>> type(a)
<type 'tuple'>
>>> print list(a)[1]
(2, 'efg')
>>> print dict(a)[1]
Traceback (most recent call last):
File "<stdin>", line 1, in ?
KeyError: 1
>>> print dict(a)[2]
efghttp://hi.baidu.com/nirenyang/blog/item/d145bf50401f217884352411.html
- python 中list dict tuple的比较
- Python中set、list、dict、tuple的比较
- Python中list,tuple,dict的区别
- python中list、set、tuple、dict比较分析
- python的list,dict,tuple比较和应用
- python的list,dict,tuple比较和应用
- python的list,dict,tuple比较和应用
- python的list,dict,tuple比较和应用
- python内置数据类型:list,tuple,dict比较
- python中list,tuple,dict,set的区别及联系
- Python中list,tuple,dict,set的区别和用法
- Python中list,tuple,dict,set的区别和用法
- python中list/tuple/dict/set的区别
- Python中list,tuple,dict,set的区别和用法
- 【python】-list,tuple,dict
- Python:list,tuple,dict
- [Python]list, tuple,dict
- Python----list,dict,tuple
- tyvj-1048 DP
- 反向Ajax,第3部分:Web服务器和Socket.IO
- 大数乘法
- 关于C#
- eclipse 插件之log4e
- python 中list dict tuple的比较
- 反向Ajax,第4部分:Atmosphere和CometD
- 2011年世界著名的杀毒软件排名是怎样的?
- 反向Ajax,第5部分:事件驱动的Web开发
- 编写高质量C#代码学习笔记(2)
- 命令模式c++实现
- linux进程调度原理
- Eclipse 中 不能创建 Dynamic web project
- 发布订阅者模式c++实现