for dn in dns:
            if isinstance(dn, list):
                for each in dn:
                    dn_list.append(each.strip())
            elif isinstance(dn, str):