def write_lines_to_text_file(lines, file_name, line_sep='\n'):
    """
    Write the lines to a text file.

    Write the lines to a text file, overwriting it in case it exists.

    Parameters
    ----------
    lines: list of str
        The lines, must not contain line ending.

    file_name: str
        Path to new text file to create (or overwrite if it exists).

    line_sep: str, optional
        Line separator. Defaults to "
".

    """
    with open(file_name, 'w') as f:
        for l in lines:
            f.write('%s%s' % (l, line_sep))
