def write_lines(file_path, new_contents):

    with open(file_path, "wb") as f:
        f.writelines([line + linesep for line in new_contents])
Write text to a file.
dataset/ETHPy150Open haesken/dftools/lib/dftlib.py/write_lines