input: Write a function to replace all occurrences of a character in a string with the provided replacement character. Define the function as replace_all_occurrences with parameters str (the input string), char (the character to be replaced), and replacement (the character to replace with). If the character does not exist in the string, return the original string.
  
  def replace_all_occurrences(str, char, replacement):
      if char in str:
          return str.replace(char, replacement)
      else:
          return str
  
  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!", 'z', 'Q') == "Hello World!"
  assert replace_all_occurrences("", 'a', 'b') == ""
  assert replace_all_occurrences("Python is great", ' ', '-') == "Python-is-great"
output: def replace_all_occurrences(str, char, replacement):
      if char in str:
          return str.replace(char, replacement)
      else:
          return str