python 字典
来源:互联网 发布:女朋友天天发脾气 知乎 编辑:程序博客网 时间:2024/05/01 14:39
字典的键值可以是任意对象,如字符串,数字和元组,另外字典可以是一列用逗号分开的值
>>> d = {}
>>> d[1,2,3] = 100
>>> d[1,2,3]
100
>>> d[(1,2,3)] = 200
>>> d
{(1, 2, 3): 200}
>>> d[(1,2,1)] = 400
>>> d
{(1, 2, 1): 400, (1, 2, 3): 200}
- Python 字典
- python 字典
- Python:字典
- Python 字典
- python字典
- Python 字典
- python 字典
- python 字典
- Python 字典
- Python字典
- python 字典
- python字典
- python 字典
- python 字典
- python--字典
- python 字典
- python字典
- Python---字典
- jQuery 获取屏幕高度、宽度
- python 方法属性(用户自定义方法,非内置方法)
- python 类,实例,模块的属性
- python 对象,属性的方法
- django 乱码解决
- python 字典
- [转] Python运算符重载
- python __str__ , __repr__区别
- django setting 配置文件
- python super 使用
- python 常用函数 filter
- Mathab中几种常见的文件格式(未完)
- 【转】python 常用函数 map reduce sorted enumerate
- python 多重继承