flatten list of lists python leetcode