Pregunta de entrevista de Doximity

What is generator and yield in python. Difference between class and function in python.