title: How to get one value at a time from a generator function in Python?
body: <p>Very basic question - how to get one value from a generator in Python?</p>
  
  <p>So far I found I can get one by writing <code>gen.next()</code>. I just want to make sure this is the right way?</p>