Reverse Integer Leetcode Solution Python