Reverse String Leetcode Solution Python