Repeated Number Leetcode Python