leetcode code in python