def longest(lst): longestList = max(lst, key = lambda i: len(i)) maxLength = max(map(len, listA)) return longestList, maxLength # Driver Code listA = [[1,2], [2,45,6,7], [11,65,2]] print("Longest List and its length:\n",longest(listA))