Very basic question - how to get one value from a generator in Python?
So far I found I can get one by writing gen.next(). I just want to make sure this
gen.next()
To get the value associated with a generator object in python 3 and above use next(). subsequent calls to next() produces successive object values in the queue.
next()