input: Write a function that takes a string and capitalizes the first character of each word. The function should 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("python is fun")=="Python Is Fun"
  assert capitalize_string("a quick brown fox")=="A Quick Brown Fox"
  assert capitalize_string("")==""
output: def capitalize_string(str):
      words = str.split(' ')
      capitalized_words = [word.capitalize() for word in words]
      return " ".join(capitalized_words)