Quiz · 3 questions
♾️ Iterators — Lazy Sequences That Don't Fit in Memory
generators / yield / itertools / async iter
Level 0Curious
0 XP0/93 lessons0/23 achievements
0/100 XP to next level100 XP to go0% complete
Quiz
01What is the difference between an *iterable* and an *iterator* in Python?
Hint
Think about what
iter() returns and what next() requires.02What does
(x*x for x in range(10**9)) use as memory roughly?Hint
How much does a generator EVALUATE when you create it?
03Why does
itertools.groupby not behave like SQL's GROUP BY?Hint
What does Unix
uniq do — and what does sort | uniq do?Comments 0
🔔 Reply notifications (sign in)Sign in — Please sign in to comment.
No comments yet — be the first.