Plus One Leetcode Solution Python