Which keyword turns a function into a generator in Python?
Correct answer
C. yield
6 views
C. yield
6 views
A function containing yield returns a generator object when called.
Asked in: Python Interview Advanced Python
https://docs.python.org/3/library/index.htmlNot sure why the answer is C? Ask here and get an explanation.