input: Write a function that takes a string and returns a new string with the first character of each word capitalized. If the string is empty, return an empty string. If the input string contains any non-alphabetic characters, they should be treated as word separators.
  def capitalize_string(str):
      if not str:
          return ""
      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 programming") == "Python Programming"
  assert capitalize_string("   ") == ""
  assert capitalize_string("") == ""
output: def capitalize_string(str):
      if not str:
          return ""
      words = str.split(' ')
      capitalized_words = [word.capitalize() for word in words]
      return " ".join(capitalized_words)