Python中列表转换成字典
来源:互联网 发布:ubuntu空闲分区不可用 编辑:程序博客网 时间:2024/05/21 17:08
第一种方法
l1 = [1, 2, 3]
l2 = ['a', 'b', 'c']
dict = dict(zip(l1, l2))
第二种方法
l1 = [1, 2, 3]
l2 = ['a', 'b', 'c']
dict = dict(map(lambda x, y: [x, y], l1, l2))
0 0
- Python中列表转换成字典
- Python -- 字典转换为列表
- Python 列表转换为字典
- python 中字典嵌套列表
- python 列表 字典 string 互相转换
- python字符串、列表、字典相互转换
- python 字典列表 列表字典
- 转自博客园Ruthless:python中字符串/元组/列表/字典转换
- 【知识】Python中字符串、元组、列表、字典的互相转换
- Python中 字典排序、列表排序
- Python中 字典排序、列表排序
- Python中 字典排序、列表排序
- python中字典和列表的区别
- python中元祖,列表,字典的区别
- python中列表 字典 元祖 enumerate()函数
- Python中字典表、列表的方式
- 【Python-3.3】字典中存储列表
- Python中 字典排序、列表排序
- No submodule mapping found in .gitmodules for path 'modules/PushMsgCenter'
- The full-stack employee(FSD)
- Activity的4种加载模式及Intent标识
- UI target/action设计模式
- POJ 2253 Frogger Kruskal最小生成树求解
- Python中列表转换成字典
- 二叉树Java实现
- 黑马程序员-----[20150416][Java内部类总结]
- linux exec与重定向
- 【万里征程——Windows App开发】如何保存、读取、删除应用数据
- 补发数据库第一章作业
- 004-struts2类型转换一
- 从Hadoop框架与MapReduce模式中谈海量数据处理(淘宝技术架构)
- javascript常用对象--Math的用法