Domanda di colloquio di Morgan Stanley

What are generator functions in python? How to implement those?