两段ip地址进行融合_HIWFS@的博客-CSDN博客

网站介绍:两段ip地址进行融合先判断两个ip地址段是否有交集,如果没有,直接输出;若有,则进行融合。ip = input(‘请输入两段IP地址:’)ip1, ip2 = ip.split(’,’)ip1_start, ip1_end = ip1[1:-1].split(’ ‘)ip2_start, ip2_end = ip2[1:-1].split(’ ‘)ip1_start = [int(i) for i in ip1_start.split(’.’)]ip1_end = [int(i) for i