pyassistant

String Length List

Given a list of strings, write a function to return a new list containing the length of each string in the original list.

Example:

Input:
['hello', 'world', 'python', 'code']
Output:
[5, 5, 6, 4]

Make sure you return your solution, don't print!

AI

Bot

Trying to solve my challenge? Ask if you must, or press the purple button so I can analyze your code.