miscset.io.read_lines

miscset.io.read_lines(path, strip='\n', *args, **kwargs)[source]

Read text as lines from a file.

A file is read line by line and parsed as a list of strings.

Parameters
  • path (str) – File path.

  • strip (str) – Characters to strip from the end of each line. None to skip stripping.

  • args – Any other argument passed to open, such as mode, encoding, etc.

  • kwargs – Any other argument passed to open, such as mode, encoding, etc.

Returns

Lines read from the file as a list of strings.

Return type

list