input: 
  def replace_all_occurrences(str: str, char: str, replacement: str) -> str:
      """
      Replaces all occurrences of the specified character in the input string with the provided replacement character.
  
      >>> replace_all_occurrences("Hello World!", 'l', 'X')
      'HeXXo WorXd!'
      """
      return str.replace(char, replacement)
  
output:     result = ""
      for c in str:
          if c == char:
              result += replacement
          else:
              result += c
      return result