Run
input = ['apple', 'banana', 'cherry'] output = [len(x) for x in input] print(output)
Output