title: Print an infinite sequence using generator
body: <p>I'm trying to create a generator that prints out a specified infinite sequence. Currently, I have the following code:</p>
  
  <pre><code>def numGen():
  for i in range(1,13):
      yield i
  </code></pre>
  
  <p>Which then gives me:</p>
  
  <pre><code>&gt;&gt;&gt; y = numGen()
  &gt;&gt;&gt; y
  &lt;generator object numGen at 0x7f6b88d22570&gt;
  &gt;&gt;&gt; y.__next__()
  1
  ...
  &gt;&gt;&gt; y.__next__()
  12
  &gt;&gt;&gt; y.__next__()
  Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt; StopIteration
  </code></pre>
  
  <p>I'm not sure what would need to be changed in order for it to reset and then print out 1, 2, 3, ..., 11, 12, 1, 2, 3,... I've tried adding the line "i += 1" after the yield line, but it would then print out 14 which isn't what I want. </p>