Leetcode Basic Problems In Python Iteration