Python version Leetcode