def token_lists_match(l, r):
 if (len(l) != len(r)):
  print("lengths don't match")
  print(len(l))
  print(len(r))
  return False
 for (l_elem, r_elem) in zip(l, r):
  assert isinstance(l_elem, (str, float, int)), type(l_elem)
  assert isinstance(r_elem, (str, float, int)), type(r_elem)
  if (l_elem != r_elem):
   print((((('"' + l_elem) + '" doesn\'t match "') + r_elem) + '"'))
   return False
 return True

def token_lists_match ( l , r ) : if ( len ( l ) != len ( r ) ) : print ( "lengths don't match" ) print ( len ( l ) ) print ( len ( r ) ) return False for ( l_elem , r_elem ) in zip ( l , r ) : assert isinstance ( l_elem , ( str , float , int ) ) , type ( l_elem ) assert isinstance ( r_elem , ( str , float , int ) ) , type ( r_elem ) if ( l_elem != r_elem ) : print ( ( ( ( ( '"' + l_elem ) + '" doesn\'t match "' ) + r_elem ) + '"' ) ) return False return True
returns true if the lists of tokens match .