title: Python Recursively check for repeats
body: <p>I have an assignment I've been stuck on for a couple days now. I have to recursively figure out if a list has repeats but I cannot use any loops or built in functions besides len(). I'm also not allowed to use the 'in' function. Returns True if list L has repeats, False otherwise. This is what I've been able to figure out:</p>
  
  <pre><code>def has_repeats(L):
      if len(L) &lt;= 1:
          return False
      elif L[0] == L[1]:
          return True
      else: return has_repeats(L[0] + L[2:])
  </code></pre>
  
  <p>But the problem with that is it's only comparing the first element to the rest, instead of each element to the rest. I can't figure out how to do that without a running counter or something. Any suggestions?</p>