话不多说,直接代码 ip_addr='192.168.2.10' # transfer ip to int def ip2long(ip): ip_list=ip.split('.') result=0 for i in range(4): #0,1,2,3 result=result+int(ip_list[i])*256**(3-i) return result long=3232236042 # transfer int to ip def long2ip(long): floor_lis…