Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Python
/
Python
What does calling a generator function do before next() or iteration begins?
from Python
advanced
1 min
What does calling a generator function do before next() or iteration begins?
It creates a generator object without running the function body
It runs the whole body and stores every yielded value in a list
It runs through the first yield and discards that value
Check
Ask AI about this kata
Report an error
previous kata
Name the exception raised when next() advances an exhausted iterator
Fill in
next kata
What does [f() for f in [lambda: i for i in range(3)]] produce?
Quiz
A new version is available
Reload