Skip to content

Commit e482a00

Browse files
committed
Merge pull request yasoob#56 from cclauss/patch-1
Python2 supports the three types of comprehensions
2 parents a10246e + d0bb90e commit e482a00

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

comprehensions.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@ Comprehensions
33

44
Comprehensions are a feature of Python which I would really miss if I
55
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:
6+
sequences to be built from other sequences. Three types of
7+
comprehensions are supported in both Python 2 and Python 3:
88

99
- list comprehensions
1010
- dictionary comprehensions
1111
- set comprehensions
1212

13-
list comprehensions were introduced in Python 2. set and
14-
dictionary comprehensions became a part of Python in version 3.0.
15-
1613
We will discuss them one by one. Once you get the hang of using ``list``
1714
comprehensions then you can use anyone of them easily.
1815

0 commit comments

Comments
 (0)