diff --git a/docs/writing/style.rst b/docs/writing/style.rst index 1fbf637d6..f9146493a 100644 --- a/docs/writing/style.rst +++ b/docs/writing/style.rst @@ -548,11 +548,11 @@ keep a count of your place in the list. .. code-block:: python for i, item in enumerate(a): - print i + ", " + item + print i, item # prints - # 0, 3 - # 1, 4 - # 2, 5 + # 0 3 + # 1 4 + # 2 5 The ``enumerate`` function has better readability than handling a counter manually. Moreover,