Reverse String Leetcode Solution In Python