1.
What is a generator in Python?

2.
How is a generator different from a regular function?

3.
What is an advantage of using generators for large datasets?

4.
How do you define a generator function in Python?

5.
What happens when you call a generator function?

6.
How are values produced in a generator function?

7.
How is a generator object iterated in a for loop?

8.
What does the StopIteration exception indicate in generators?

9.
Which of the following is NOT a benefit of using generators?

10.
What is the main purpose of a generator expression in Python?