Run
len_of_strings = lambda names: [len(x) for x in names] names = ['apple', 'banana', 'fig'] lengths = len_of_strings(names) print(lengths)
Output