enumerate
function does and write your own my_enumerate
that has the same effect.clock_generator()
which starts at midnight, moves the time by one hour and returns the time in 12-hour format,
e.g. 11 am
or 3 pm
and we can call it and advance by one hour infinitely many times:
>>> my_clock = clock_generator()
>>> print(next(my_clock))
12 am
>>> print(next(my_clock))
1 am
>>> print(next(my_clock))
2 am
>>> print(next(my_clock))
3 am