Given a message, parse out the ips in the answer

def parse_out_ips(message):
    """Given a message, parse out the ips in the answer"""

    ips = []
    for entry in message.answer:
        for rdata in entry.items:
            ips.append(rdata.to_text())
    return ips