title: shortest repeated substring [PYTHON]
body: <p>Is there a quick method to find the shortest repeated substring and how many times it occurs? If there is non you only need to return the actual string ( last case ).  </p>
  
  <pre><code>&gt;&gt;&gt; repeated('CTCTCTCTCTCTCTCTCTCTCTCT') 
  ('CT', 12)
  
  &gt;&gt;&gt; repeated('GATCGATCGATCGATC')          
  ('GATC', 4)
  
  &gt;&gt;&gt; repeated('GATCGATCGATCGATCG')         
  ('GATCGATCGATCGATCG', 1)
  </code></pre>
  
  <p>Because some people think it's 'homework' I can show my efforts:</p>
  
  <pre><code>def repeated(sequentie):
      string = ''
  
      for i in sequentie:
          if i not in string:
              string += i
  
      items = sequentie.count(string)
      if items * len(string) == len(sequentie):
          return (string, items)
      else:
          return (sequentie, 1)
  </code></pre>