leetcode python code