Given a list of strings, write a function to return a new list containing the length of each string in the original list.
['hello', 'world', 'python', 'code']
[5, 5, 6, 4]
Bot