Python Practice Programs Leetcode 150