class Solution:
def reverse(self, string):
if len(string) == 0:
return string
else:
return self.reverse(string[1:]) + string[0]
a = 'hello'
print Solution().reverse(a)
output seems to be 'olleh' but my logic says it should be 'hello' after + string[0] any one knows why?