from pathlib import Path def readFirstLine(file: Path) -> str: """ :param file: Path to file :return: first line of file """ with open(file, "r") as f: return f.readline()