def dnslib_record2iplist(record):
 assert isinstance(record, dnslib.DNSRecord)
 iplist = [x for x in (str(r.rdata) for r in record.rr) if (re.match('^\\d+\\.\\d+\\.\\d+\\.\\d+$', x) or (':' in x))]
 return iplist

def dnslib_record2iplist ( record ) : assert isinstance ( record , dnslib . DNSRecord ) iplist = [ x for x in ( str ( r . rdata ) for r in record . rr ) if ( re . match ( '^\\d+\\.\\d+\\.\\d+\\.\\d+$' , x ) or ( ':' in x ) ) ] return iplist
convert dnslib .