input: Write a function to take a string as input and capitalize the first character of each word in the string. Return the modified string.
  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("")==""
  assert capitalize_string("python programming")=="Python Programming"
output: def capitalize_string(str):
      words = str.split(' ')
      capitalized_words = [word.capitalize() for word in words]
      return " ".join(capitalized_words)