Interviews1 answer
What does the “yield” keyword do?
1 Answer
yield is a keyword in Python that is used to return from a function without destroying the states of its local variable and when the function is called, the execution starts from the last yield statement. Any function that contains a yield keyword is termed as generator.
Pranam BhatPosted May 27, 2021, 7:42 AM EDT


