Skip to content

Commit

Permalink
Merge pull request #3 from phihag/patch-3
Browse files Browse the repository at this point in the history
one_liners: PEP8 and text syntax
  • Loading branch information
yasoob committed Aug 17, 2015
2 parents d6cf850 + 33d9840 commit d07341e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions one_liners.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ repl. Here is the relevant code:
from pprint import pprint
my_dict = {'name':'Yasoob',
'age':'undefined','personality':'awesome'}
my_dict = {'name': 'Yasoob', 'age': 'undefined', 'personality': 'awesome'}
pprint(my_dict)
This is more effective on dicts. Moreover, if you want to pretty print
Expand Down Expand Up @@ -74,4 +73,4 @@ is a simple example:
# Output: [1, 2, 3, 4, 5, 6]
A couple of more one liners can be found on the `Python
website <https://wiki.python.org/moin/Powerful%20Python%20One-Liners>`__
website <https://wiki.python.org/moin/Powerful%20Python%20One-Liners>`__.

0 comments on commit d07341e

Please sign in to comment.