input: Write a function to replace all occurrences of a specified character in a given string with another provided character. The function should return the modified string.
  
  def replace_all_occurrences(str, char, replacement):
    return str.replace(char, replacement)
  
  assert replace_all_occurrences("Hello World!", 'l', 'X') == "HeXXo WorXd!"
  assert replace_all_occurrences("Python Programming", 'o', 'A') == "PythAn PrAgrAmming"
  assert replace_all_occurrences("No replacements needed", 'z', 'Y') == "No replacements needed"
  assert replace_all_occurrences("", 'a', 'b') == ""
  assert replace_all_occurrences("All A's will be replaced", 'A', 'X') == "All X's will be replaced"
output: def replace_all_occurrences(str, char, replacement):
    return str.replace(char, replacement)