1 parent 9b9f20a commit d0bb90eCopy full SHA for d0bb90e
1 file changed
comprehensions.rst
@@ -3,16 +3,13 @@ Comprehensions
3
4
Comprehensions are a feature of Python which I would really miss if I
5
ever have to leave it. Comprehensions are constructs that allow
6
-sequences to be built from other sequences. There are three type of
7
-comprehensions in Python:
+sequences to be built from other sequences. Three types of
+comprehensions are supported in both Python 2 and Python 3:
8
9
- list comprehensions
10
- dictionary comprehensions
11
- set comprehensions
12
13
-list comprehensions were introduced in Python 2. set and
14
-dictionary comprehensions became a part of Python in version 3.0.
15
-
16
We will discuss them one by one. Once you get the hang of using ``list``
17
comprehensions then you can use anyone of them easily.
18
0 commit comments