def text_to_bin(ip):
 if (':' not in ip):
  return ipv4_to_bin(ip)
 else:
  return ipv6_to_bin(ip)

def text_to_bin ( ip ) : if ( ':' not in ip ) : return ipv4_to_bin ( ip ) else : return ipv6_to_bin ( ip )
converts human readable ipv4 or ipv6 string to binary representation .