input: Write a function to replace all occurrences of a character in a given string with the provided replacement character. If no character or replacement is provided, return the original string.
  def replace_all_occurrences(str, char=None, replacement=None):
      if char is None or replacement is None:
          return str
      return str.replace(char, replacement)
  
  assert replace_all_occurrences("Hello World!", 'l', 'X') == "HeXXo WorXd!"
  assert replace_all_occurrences("Hello World!", 'o', 'Y') == "HellY WYrld!"
  assert replace_all_occurrences("Hello World!", None, 'X') == "Hello World!"
  assert replace_all_occurrences("Hello World!", 'l', None) == "Hello World!"
  assert replace_all_occurrences("Hello World!", 'z', 'X') == "Hello World!"
  assert replace_all_occurrences("", 'l', 'X') == ""
output: def replace_all_occurrences(str, char=None, replacement=None):
      if char is None or replacement is None:
          return str
      return str.replace(char, replacement)