Kaydet (Commit) 8699aeaf authored tarafından Raymond Hettinger's avatar Raymond Hettinger

The key-value pairs can be lists or tuples or any iterable.

üst 2c860044
...@@ -466,7 +466,7 @@ Here is a small example using a dictionary:: ...@@ -466,7 +466,7 @@ Here is a small example using a dictionary::
False False
The :func:`dict` constructor builds dictionaries directly from sequences of The :func:`dict` constructor builds dictionaries directly from sequences of
key-value pairs stored as tuples. :: key-value pairs::
>>> dict([('sape', 4139), ('guido', 4127), ('jack', 4098)]) >>> dict([('sape', 4139), ('guido', 4127), ('jack', 4098)])
{'sape': 4139, 'jack': 4098, 'guido': 4127} {'sape': 4139, 'jack': 4098, 'guido': 4127}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment