def tokenize_by_number(s):
 r = find_number(s)
 if (r is None):
  return [s]
 else:
  tokens = []
  if (r[0] > 0):
   tokens.append(s[0:r[0]])
  tokens.append(float(s[r[0]:r[1]]))
  if (r[1] < len(s)):
   tokens.extend(tokenize_by_number(s[r[1]:]))
  return tokens
 assert False

def tokenize_by_number ( s ) : r = find_number ( s ) if ( r is None ) : return [ s ] else : tokens = [ ] if ( r [ 0 ] > 0 ) : tokens . append ( s [ 0 : r [ 0 ] ] ) tokens . append ( float ( s [ r [ 0 ] : r [ 1 ] ] ) ) if ( r [ 1 ] < len ( s ) ) : tokens . extend ( tokenize_by_number ( s [ r [ 1 ] : ] ) ) return tokens assert False
splits a string into a list of tokens .