iterables and iterations Flashcards

1
Q

map

A

map(f, a, b,c )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

get count object

A

itertools.count()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

import reduce

A

from functools import reduce

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

reduce example

A

reduce(operator.add, values, 0)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

iterator protocol

A

__iter__(), __next__(), StopIteration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

alternative iterable protocol

A

__getitem__()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

iter

A

iter(callable, sentinel)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly