Update docs/writing/style.rst

This commit is contained in:
Estevan Pequeno
2011-12-30 11:02:43 -06:00
parent 19111aa517
commit b147a1c490
+6
View File
@@ -7,6 +7,12 @@ Idioms
Idiomatic Python code is often referred to as being *pythonic*.
A common idiom for creating strings is to use `join <http://docs.python.org/library/string.html#string.join>`_ on an empty string.::
letters = ['s', 'p', 'a', 'm']
word = ''.join(letters)
This will set the value of the variable *word* to 'spam'. This idiom can be applied to lists and tuples.
Zen of Python
-------------