Python Practice Programs Leetcode Two