title: Delete elements of an integer recursively
body: <p>My parameter, <code>n</code> is a phone number as an integer.</p>
  
  <p>Using recursion I want to return the first three numbers in the integer. </p>
  
  <p>I've turned the integer into a list of individual number characters and I'm attempting to delete the last number over and over again until I'm left with the last three, but I'm stuck on how to repeat it.</p>
  
  <pre><code>def areaCodes(n):
      n = str(n)  
      n = list(n)
      del n[-1] 
      #n = reduce(opperator.add, n)
      n =  ''.join(n)
      n = int(n)
      return n
  </code></pre>
  
  <p>I know I'm supposed to repeat the name in the return somehow, but because <code>n</code> isn't an integer that I can use to repeat. What do I do?</p>