input: Write a function to replace all occurrences of a character in a string with the provided replacement character. If the input string is empty, return an empty string.
  
  ### Function:
  def replace_all_occurrences(str, char, replacement):
      if not str:
          return ""
      return str.replace(char, replacement)
  
  ### Test Cases:
  assert replace_all_occurrences("Hello World!", 'l', 'X') == "HeXXo WorXd!"
  assert replace_all_occurrences("Hello World!", 'o', 'Z') == "HellZ WZrld!"
  assert replace_all_occurrences("Hello World!", ' ', '_') == "Hello_World!"
  assert replace_all_occurrences("Hello World!", 'z', 'Y') == "Hello World!"
  assert replace_all_occurrences("", 'a', 'b') == ""
output: def replace_all_occurrences(str, char, replacement):
      if not str:
          return ""
      return str.replace(char, replacement)