def from_string(s):
 return reduce((lambda a, b: ((a << 8) | b)), map(int, s.split('.')))

def from_string ( s ) : return reduce ( ( lambda a , b : ( ( a << 8 ) | b ) ) , map ( int , s . split ( '.' ) ) )
convert dotted ipv4 address to integer .