mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 23:00:18 +00:00
Reworded per rgbkrk's suggestion
This commit is contained in:
@@ -273,8 +273,8 @@ Unpacking
|
|||||||
~~~~~~~~~
|
~~~~~~~~~
|
||||||
|
|
||||||
If you know the length of a list or tuple, you can assign names to its
|
If you know the length of a list or tuple, you can assign names to its
|
||||||
elements with unpacking. For example, since you know that ``enumerate()``
|
elements with unpacking. For example, since ``enumerate()`` will provide
|
||||||
will provide a tuple of two elements for each item in list:
|
a tuple of two elements for each item in list:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user