文章标题

来源:互联网 发布:unity3d动态加载图片 编辑:程序博客网 时间:2024/06/07 06:36
>>> a = dict(one=1, two=2, three=3)>>> b = {'one': 1, 'two': 2, 'three': 3}>>> c = dict(zip(['one', 'two', 'three'], [1, 2, 3]))>>> d = dict([('two', 2), ('one', 1), ('three', 3)])>>> e = dict({'three': 3, 'one': 1, 'two': 2})>>> a == b == c == d == eTrue

创建字典的几种方法。

0 0
原创粉丝点击