def replace_space(string):
    """Replace a space to %20 for url.

    Parameters
    ----------
    string:
        A string

    Returns
    -------
    string:
        A reformatted string.
    """
    return string.replace(' ', '%20')