input: Write a function to replace all occurrences of a character in a given string with a provided replacement character. If the input string is empty, return the 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("Python Programming", 'm', 'a')=="Pythona Prograaing"
  assert replace_all_occurrences("Coding is fun", 'o', 'O')=="Ciding is fOn"
  assert replace_all_occurrences("", 'a', 'b')==""
  assert replace_all_occurrences("Mississippi", 's', 'z')=="Mizzizzippi"
output: def replace_all_occurrences(str, char, replacement):
    if not str:
      return ""
    return str.replace(char, replacement)