✨generator examples
JS⟩ iteration ⟩ custom generators
*list() - finite arithmetic sequence.
*integers() - infinite non-negative integers: 0, 1, 2, 3 ...
*fibonacci() - infinite/finite fibonacci numbers: 1, 1, 2, 3, 5, 8 ...
*sequence() - yield values sequentially.
*interleave() - interleave the values of iterables.
*zip() - zip iterables into a single generator function.
Last updated