OLD | NEW |
1 import itertools | 1 import itertools |
2 from itertools import imap, ifilter | 2 from itertools import imap, ifilter |
3 | 3 |
4 # A104 | 4 # A104 |
5 map(lambda x: x, range(10)) | 5 map(lambda x: x, range(10)) |
6 # A104 | 6 # A104 |
7 filter(lambda x: x, range(10)) | 7 filter(lambda x: x, range(10)) |
8 # A104 | 8 # A104 |
9 imap(lambda x: x, range(10)) | 9 imap(lambda x: x, range(10)) |
10 # A104 | 10 # A104 |
11 ifilter(lambda x: x, range(10)) | 11 ifilter(lambda x: x, range(10)) |
12 # A104 | 12 # A104 |
13 itertools.imap(lambda x: x, range(10)) | 13 itertools.imap(lambda x: x, range(10)) |
14 # A104 | 14 # A104 |
15 itertools.ifilter(lambda x: x, range(10)) | 15 itertools.ifilter(lambda x: x, range(10)) |
16 | 16 |
17 map(lambda a, b: a or b, [0, 1], [2, 3]) | 17 map(lambda a, b: a or b, [0, 1], [2, 3]) |
OLD | NEW |