参数: dict1, dict2 需求:如果dict1和dict2中有不同的key,那么返回这个(key, dict1[key]):如果dict1和dict2中有相同的key,但是value不同,返回这个(key, dict1[key]) 实现: def dict_different_data(first, second): """ get the different data bewtten two dicts objects return :result = first…
int_ip = lambda x: '.'.join([str(x/(256**i)%256) for i in range(3,-1,-1)]) ip_int = lambda x:sum([256**j*int(i) for j,i in enumerate(x.split('.')[::-1])]) def get_ips(ip1,ip2): f=open('ips.txt','w') ip1_num = ip_int(ip1) ip2_num = ip_int(ip2) for i i…