input: Write a python function to calculate the sum of lengths of all words in a sentence.
  assert sum_of_words("This is a sentence") == 16
  assert sum_of_words("Hello world") == 10
  assert sum_of_words("Python programming is fun") == 24
output: def sum_of_words(sentence):
      return sum(len(word) for word in sentence.split())