Python Programming: Lesson 32 - Itertools

preview_player
Показать описание
PLEASE SUBSCRIBE!!!

0:33 Review of Recursion
4:03 NEW: Intro to Itertools
7:54 NEW: count(x) Generator yields x, x+1, x+2, ...
9:41 NEW: cycle(x) Generator cycles through the elements in x over and over again
11:33 NEW: repeat(x) Generator yields x over and over again
12:39 NEW: takewhile(x,y) accepts a predicate x and yields the elements in y while x is true
14:00 NEW: chain(x, y, ...) iterates through the elements in x, then in y, etc.
15:15 NEW: accumulate(x) yields a running total of the values in x
16:33 NEW: product(x,y) yields all possible tuples (a,b) where a is in x and b is in y
18:32 NEW: permutations(x) yields all orderings of the elements in x

Thanks for watching, and PLEASE SUBSCRIBE!!!
Рекомендации по теме
join shbcf.ru