input: Write a function to capitalize the first character of each word in a given string. The function should return the string with all the first characters of the words capitalized.
  def capitalize_string(str):
      words = str.split(' ')
      capitalized_words = [word.capitalize() for word in words]
      return " ".join(capitalized_words)
  
  assert capitalize_string("this is an example") == "This Is An Example"
  assert capitalize_string("hello world") == "Hello World"
  assert capitalize_string("capitalize this sentence") == "Capitalize This Sentence"
  assert capitalize_string("") == ""
  assert capitalize_string("a b c d e f g") == "A B C D E F G"
output: def capitalize_string(str):
      words = str.split(' ')
      capitalized_words = [word.capitalize() for word in words]
      return " ".join(capitalized_words)