Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8b0f3ad + a20879f commit a5941f8Copy full SHA for a5941f8
1 file changed
Doc/library/stdtypes.rst
@@ -2976,13 +2976,13 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:
2976
replaces the value from the positional argument.
2977
2978
To illustrate, the following examples all return a dictionary equal to
2979
- ``{"one": 1, "two": 2}``::
+ ``{"one": 1, "two": 2, "three": 3}``::
2980
2981
- >>> a = dict(one=1, two=2)
2982
- >>> b = dict({'one': 1, 'two': 2})
2983
- >>> c = dict(zip(('one', 'two'), (1, 2)))
2984
- >>> d = dict([['two', 2], ['one', 1]])
2985
- >>> e = {"one": 1, "two": 2}
+ >>> 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})
2986
>>> a == b == c == d == e
2987
True
2988
0 commit comments