linesStripBottom

emlib.textlib.linesStripBottom(lines, maxlines=0)[source]

Strip empty lines from the end of the list

Parameters:
  • lines (list[str]) – lines already split

  • maxlines (int) – the max. number of empty lines to leave at the end

Return type:

list[str]

Returns:

a list of lines with at most maxlines empty lines at the end