Can you write a code snippet in Python that replaces all occurrences of a specific character in a string?
string = "Hello World"
character = "o"
def replace_all_occurrences(string, character): 
  return string.replace(character, "")