(domain)
return domain[:last_dot] + "[.]" + domain[last_dot+1:]
Add protective bracket to a domain
Add protective bracket to a domain
Add protective bracket to a domain
def bracket(domain):
    """Add protective bracket to a domain"""
    last_dot = domain.rfind(".")
    return domain[:last_dot] + "[.]" + domain[last_dot+1:]
def bracket ( domain ) : last_dot = domain . rfind ( "." ) return domain [ : last_dot ] + "[.]" + domain [ last_dot + 1 : ]