We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 60fd597 + 84fa832 commit e9983aeCopy full SHA for e9983ae
comprehensions.rst
@@ -11,7 +11,7 @@ comprehensions are supported in both Python 2 and Python 3:
11
- set comprehensions
12
13
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.
+comprehensions then you can use any of them easily.
15
16
``list`` comprehensions
17
^^^^^^^^^^^^^^^^^^^^^^^
@@ -88,6 +88,6 @@ that they use braces ``{}``. Here is an example:
88
89
.. code:: python
90
91
- squared = {x for x in [1, 1, 2]}
+ squared = {x**2 for x in [1, 1, 2]}
92
print(squared)
93
- # Output: {1, 2}
+ # Output: {1, 4}
0 commit comments