When you make a generator by calling a function or method that has the yield
keyword in it you get an object that has a next
method.
So far as I can tell, there isn't a difference between using this method and using the next
builtin function.
e.g. my_generator.next()
vs next(my_generator)
So is there any difference? If not, why are there two ways of calling next on a generator?