mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 23:00:18 +00:00
@@ -543,6 +543,7 @@ Use :py:func:`enumerate` keep a count of your place in the list.
|
|||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
|
a = [3, 4, 5]
|
||||||
for i, item in enumerate(a):
|
for i, item in enumerate(a):
|
||||||
print i, item
|
print i, item
|
||||||
# prints
|
# prints
|
||||||
|
|||||||
Reference in New Issue
Block a user