(ip)
return int2ip(ip2int(ip) + 1)
Return the next IP address following the given IP address.
       It needs to be converted to an integer, then add 1,
       then converted back to an IP address
Return the next IP address following the given IP address.
       It needs to be converted to an integer, then add 1,
       then converted back to an IP address
Return the next IP address following the given IP address . It needs to be converted to an integer then add 1 then converted back to an IP address
def next_ip(ip):
    """Return the next IP address following the given IP address.
       It needs to be converted to an integer, then add 1,
       then converted back to an IP address
    """
    ip2int = lambda ipstr: struct.unpack('!I', socket.inet_aton(ipstr))[0]
    int2ip = lambda n: socket.inet_ntoa(struct.pack('!I', n))
    return int2ip(ip2int(ip) + 1)
def next_ip ( ip ) : ip2int = lambda ipstr : struct . unpack ( '!I' , socket . inet_aton ( ipstr ) ) [ 0 ] int2ip = lambda n : socket . inet_ntoa ( struct . pack ( '!I' , n ) ) return int2ip ( ip2int ( ip ) + 1 )