def dasherize(string):
    """Returns a copy of `string` where all occurrences of underscores and
    spaces are replaced with dashes.

    :param string: string to replace underscores with dashes.
    """
    return string.replace('_', '-').replace(' ', '-')