input: Write a python function to calculate the length of each word in a given sentence and return a list of those lengths.
  assert lengthWord("Generating a code generation task instructions") == [10, 1, 4, 10, 4, 12]
  assert lengthWord("This is an example") == [4, 2, 2, 7]
  assert lengthWord("Another test") == [7, 4]
output: def lengthWord(sentence):
      return [len(word) for word in sentence.split()]