How to get one value at a time from a generator function in Python?

前端 未结 6 1961
鱼传尺愫
鱼传尺愫 2020-12-24 04:08

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

6条回答
提交回复
热议问题