Create a function in Python to replace all spaces in a given string with an underscore.
The quick brown fox
def replace_space(string):
    return string.replace(" ", "_")

replace_space("The quick brown fox") # Outputs: The_quick_brown_fox