What does the send() method of a generator do in Python?
Correct answer
A. Sends a value into the generator at the yield expression
5 views
A. Sends a value into the generator at the yield expression
5 views
send resumes the generator and the sent value becomes the result of yield.
Asked in: Python Interview Advanced
https://docs.python.org/3/library/index.htmlNot sure why the answer is A? Ask here and get an explanation.