how to use a generator object code example
Example: python generator
def count_to_ten_generator():
for number in range(10):
yield number
my_generator = count_to_ten_generator()
first_number = next(my_generator)
list_or_the_rest = list(my_generator)