title: Best practice to make a generator loop through a container infinite times
body: <p>I'm trying to use a generator to return elements from a container, but it needs to return/exhaust all elements then do it again.</p>
  
  <p>The reason I say this is if there's a faster/better or more pythonic way to do this than just a for loop as I don't need them in order but I don't want to get the same item twice until it has exhausted all elements.</p>
  
  <p>The example below is a tuple, although if there is a better container type for this than I'm all ears.</p>
  
  <pre><code>elements = ('a', 'b', 'c', ...)
  
  def get_next_element():
      while True:
          for e in elements:
              yield e
  </code></pre>
  
  <p>There's got to be a different way to do this, or is this the best way?</p>
  
  <p>I'm using Python 3.6.</p>