TUTORIALProgrammingFETCHED
Python 练习实例100
Python 练习实例100 Python 100例 题目:列表转换为字典。 程序分析:无。 程序源代码: 实例 [mycode3 type='python'] #!/usr/bin/python # -*- coding: UTF-8 -*- i = ['a', 'b'] l = [1, 2] print dict([i,l]) [/mycode3] 以..
Updated 7/16/2026
Tutorial detail pages default to noindex.
Python 练习实例100
题目:列表转换为字典。
程序分析:无。
程序源代码:
实例
#!/usr/bin/python
# -*- coding: UTF-8 -*-
i = ['a', 'b']
l = [1, 2]
print dict([i,l])
以上实例输出结果为:
{'a': 'b', 1: 2}
Python 100例