Skip to content

Commit e9983ae

Browse files
committed
Merge pull request yasoob#73 from JoshMcCullough/patch-3
Small edits to Comprehensions.
2 parents 60fd597 + 84fa832 commit e9983ae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

comprehensions.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ comprehensions are supported in both Python 2 and Python 3:
1111
- set comprehensions
1212

1313
We will discuss them one by one. Once you get the hang of using ``list``
14-
comprehensions then you can use anyone of them easily.
14+
comprehensions then you can use any of them easily.
1515

1616
``list`` comprehensions
1717
^^^^^^^^^^^^^^^^^^^^^^^
@@ -88,6 +88,6 @@ that they use braces ``{}``. Here is an example:
8888

8989
.. code:: python
9090
91-
squared = {x for x in [1, 1, 2]}
91+
squared = {x**2 for x in [1, 1, 2]}
9292
print(squared)
93-
# Output: {1, 2}
93+
# Output: {1, 4}

0 commit comments

Comments
 (0)