title: Recursively calculate length of string (error: list index out of range)
body: <p>This is my code which should calculate the length of string recursively, bu it give error of list index out of range. Please correct Me!</p>
  
  <pre><code>s=list()
  smallOutput=int()
  def lengthh(s):
      if (s[0]=='\0'):
          return 0
  
      smallOutput=lengthh(s[1:])
      return 1 + smallOutput
  
  strr="abc"
  array=list(strr)
  print lengthh(array)
  </code></pre>