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()
In python 3 you don't have gen.next(), but you still can use next(gen). A bit bizarre if you ask me but that's how it is.
next(gen)