Repeated Number Leetcode Python Questions