diff --git a/docs/writing/style.rst b/docs/writing/style.rst index c50c3452d..e54e6be20 100644 --- a/docs/writing/style.rst +++ b/docs/writing/style.rst @@ -248,7 +248,7 @@ keep a count of your place in the list. .. code-block:: python - for i, item in a: + for i, item in enumerate(a): print i + ", " + item # prints # 0, 3