1.

A generator function returns a sequence of values by using a statement is

Answer»

tion:A GENERATOR is a special type of FUNCTION which does not RETURN a single value, instead, it returns an iterator object with a SEQUENCE of VALUES. In a generator function, a yield statement is used rather than a return statement. ... So, this will return the value against the yield keyword each time it is called.



Discussion

No Comment Found

Related InterviewSolutions