title: Python yield (migrating from Ruby): How can I write a function without arguments and only with yield to do prints?
body: <p>I've been converting Ruby code to Python code and now I'm stuck with this function that contains <code>yield</code>:</p>
  
  <pre><code>def three_print():
      yield
      yield
      yield
  </code></pre>
  
  <p>I would like to call the function and tell it to print "Hello" three times because of the three <code>yield</code> statements. As the function does not take any arguments I get an error. Can you tell me the easiest way to get it working? Thank you.</p>