Leetcode 399 Python Example For Beginners