title: Find if groups of characters are repeated in a string in python
body: <p>I am a beginner and I want to know that how to determine if a string contains characters which are re-occuring in a pattern.</p>
  
  <p>Example: "aabcdabcdabcdabcd"
  Here four characters - 'abcd' ore getting repeated.
  But I do not know that how many characters are getting repeated.</p>
  
  <p>The pattern is not certain. I do not know it. "abcd is just" an example.
  The pattern can be in any order
  Please help.
  My code is :</p>
  
  <p>I don't actually know the string!</p>
  
  <pre><code>s1=str("aabcdabcdabcd")
  x=0
  z=""
  for i in range (1,len(s1)):
      z=s1[i:i+5]
      s1.replace(z,"",1)
      if z in s1:
            x+=1
      if x!=0:
            print "yes":
      else:
            print "no"
  </code></pre>
  
  <p>The above program works only for the given string. I want it to be able to evaluate any string.</p>