def cmp_version(a, b):
 a = a.split('.')
 b = b.split('.')
 for (va, vb) in zip(a, b):
  ret = (int(va) - int(vb))
  if ret:
   return ret
 return (len(a) - len(b))

def cmp_version ( a , b ) : a = a . split ( '.' ) b = b . split ( '.' ) for ( va , vb ) in zip ( a , b ) : ret = ( int ( va ) - int ( vb ) ) if ret : return ret return ( len ( a ) - len ( b ) )
compare two version strings in the form of 1 .