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 19111aa commit b147a1cCopy full SHA for b147a1c
docs/writing/style.rst
@@ -7,6 +7,12 @@ Idioms
7
8
Idiomatic Python code is often referred to as being *pythonic*.
9
10
+A common idiom for creating strings is to use `join <http://docs.python.org/library/string.html#string.join>`_ on an empty string.::
11
+
12
+ letters = ['s', 'p', 'a', 'm']
13
+ word = ''.join(letters)
14
15
+This will set the value of the variable *word* to 'spam'. This idiom can be applied to lists and tuples.
16
17
Zen of Python
18
-------------
0 commit comments