mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 14:50:19 +00:00
Reset list 'a'
The result of the previous block containing the map example left 'a' to be [6, 7, 8], so resetting 'a' back to [3, 4, 5] seems to keep the example in line with the other ones.
This commit is contained in:
@@ -543,6 +543,7 @@ Use :py:func:`enumerate` keep a count of your place in the list.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
a = [3, 4, 5]
|
||||
for i, item in enumerate(a):
|
||||
print i, item
|
||||
# prints
|
||||
|
||||
Reference in New Issue
Block a user