def is_valid_fqdn(fqdn):
 return (re.match('^[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$', fqdn) is not None)

def is_valid_fqdn ( fqdn ) : return ( re . match ( '^[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$' , fqdn ) is not None )
verify whether a host is a valid fqdn .