input: Write a function to replace all occurrences of a character in a string with the provided replacement character. If the given string is empty then return an empty string.
  
  def replace_all_occurrences(str, char, replacement):
      if not str:
          return ""
      return str.replace(char, replacement)
  
  assert replace_all_occurrences("Hello World!", 'l', 'X') == "HeXXo WorXd!"
  assert replace_all_occurrences("Programming is fun!", 'm', 'z') == "Prograzzing is fun!"
  assert replace_all_occurrences("", 'a', 'b') == ""
  assert replace_all_occurrences("Python", 'P', 'p') == "python"
  assert replace_all_occurrences("Test", 't', 'T') == "TesT"
output: def replace_all_occurrences(str, char, replacement):
      if not str:
          return ""
      return str.replace(char, replacement)