input: Write a function to capitalize the first character of each word in a given string. If the given string is empty, return an empty string.
  capitalize_string(str):
      if not str: # If given string is empty
          return ""
      words = str.split(' ')
      capitalized_words = [word.capitalize() for word in words]
      return " ".join(capitalized_words)
  
  # Test Cases
  assert capitalize_string("this is an example") == "This Is An Example"
  assert capitalize_string("") == ""
  assert capitalize_string("hello world") == "Hello World"
  assert capitalize_string("PYTHON PROGRAMMING") == "Python Programming"
  assert capitalize_string("initialize your variables") == "Initialize Your Variables"
output: def capitalize_string(str):
      if not str:
          return ""
      words = str.split(' ')
      capitalized_words = [word.capitalize() for word in words]
      return " ".join(capitalized_words)