We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9b5021 commit bc7799dCopy full SHA for bc7799d
docs/writing/structure.rst
@@ -445,7 +445,8 @@ with calls to append().
445
.. code-block:: python
446
447
# create a concatenated string from 0 to 19 (e.g. "012..1819")
448
- print "".join([str(n) for n in range(20)])
+ nums = [str(n) for n in range(20)]
449
+ print "".join(nums)
450
451
One final thing to mention about strings is that using join() is not always
452
best. In the instances where you are creating a new string from a pre-determined
0 commit comments