This code should reverse the string but i am not getting why is it not reversing the string? :     class Solution:
        def reverseString(self, s: List[str]) -> None:
            if(len(s)<=1):
                return
            s[0],s[-1] = s[-1],s[0]
            self.reverseString(s[1:-1])

this was a question on leetcode. we have to reverse the string using recursion without using extra memory, i.e inplace. I wrote thos code but am not sure why is it not working.