Practice
Learn
← Quit
0 / 0 correct
Python
Easy
1 of 40
What is the main advantage of a generator function (using yield) over returning a list?
A
It can be indexed randomly
B
It is always faster per element
C
It runs in parallel
D
It produces values lazily, one at a time, using constant memory