Leetcode Problem Reverse Integer In Python