def escape_quotes(s: str) ->str:
    """Replaces double quotes in the input string with either ' or \\". 
        
    Description:
        Given a string, returns that string with double quotes escaped in one of two ways.
        If the string contains single quotes, then \\" will be used to escape the double quotes. 
        Otherwise, a single quote (') will be used instead.

    Examples:
        >>> escape_quotes('one "two" three')
        "one 'two' three"
        >>> escape_quotes('"He said he didn\\'t know."')
        '\\\\"He said he didn\\'t know.\\\\"'
    """
    if "'" in s:
        return s.replace('"', '\\"')
    return s.replace('"', "'")
