langchain_core.output_parsers.list.droplastn

langchain_core.output_parsers.list.droplastn(iter: Iterator[T], n: int) Iterator[T][source]

Drop the last n elements of an iterator.

Parameters
  • iter (Iterator[T]) –

  • n (int) –

Return type

Iterator[T]