title: Python Recursion and list
body: <p>I am learning about recursion in python and I have this code:</p>
  
  <pre><code>def search(l,key):
      """
      locates key in list l.  if present, returns location as an index; 
      else returns False.
      PRE: l is a list.
      POST: l is unchanged; returns i such that l[i] == key; False otherwise.
      """
  
      if l:   # checks if list exists
          if l[0] == key:     # base case - first index is key
              return True
  
          s = search(l[1:], key)      # recursion
          if s is not False:          
              return s
  
      return False            # returns false if key not found
  </code></pre>
  
  <p>Can someone explain to me what the line</p>
  
  <pre><code>s = search(l[1:], key)
  </code></pre>
  
  <p>does exactly? and what does l[1:] do to the list?</p>