python-dict()

本文涉及的产品
实时计算 Flink 版,5000CU*H 3个月
检索分析服务 Elasticsearch 版,2核4GB开发者规格 1个月
大数据开发治理平台 DataWorks,不限时长
简介: python-dict()

dict() - 创建一个字典。

my_dict=dict([('name', 'John'), ('age', 30)])  # 从键值对列表创建字典print(my_dict)  # 输出:{'name': 'John', 'age': 30}
相关文章
|
4天前
|
索引
python-enumerate()
python-enumerate
21 1
|
9月前
|
C++ 索引 Python
Python 字典dict详解(超详细)
Python 字典dict详解(超详细)
93 0
|
10月前
|
索引 Python
Python中list和dict的详细用法
Python中list和dict的详细用法
98 0
|
11月前
|
存储 Python
python|Python中的dict
python|Python中的dict
84 0
|
12月前
|
存储 Python
Python字典(dict)的介绍
Python字典(dict)的介绍
276 0
|
Python
python(13)--字典(Dict)
python(13)--字典(Dict)
97 0
python(13)--字典(Dict)
|
存储 Python 容器
Python__14--字典
字典的定义、创建与字典元素的获取
|
存储 Python 容器
python dict 字典
python dict 字典
|
存储 索引 Python
Python 字典 — dict
Python 字典 — dict