Tell me what are generators in python?



Tell me what are generators in python?..

Answer / Shivendra Sahai

"Generators are iterables that allow you to write coroutines and produce values on-the-fly. They are created using the 'yield' keyword."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

Explain me what is flask-wtf and what are their features?

1 Answers  


What is threads life cycle?

1 Answers  


Should I learn c++ or python?

1 Answers  


does recursion cause any trouble?

1 Answers  


Can you use bootstrap with python?

1 Answers  


How do you access private methods in python?

1 Answers  


What are your weaknesses examples?

1 Answers  


What is purpose of __init__ in class ? Is it necessary to use __init__ while creating a class ?

1 Answers  


What does head () do in python?

1 Answers  


What are the different types of operators in python?

1 Answers  


How to get all keys from dictionary ?

1 Answers  


How to walk through a list in a sorted order without sorting the actual list?

1 Answers  


Categories