import csv


def write_rows(rows, filename, sep="\t"):
    """Given a list of lists, write to a tab separated file"""
    with open(filename, "w", newline="") as csvfile:
        writer = csv.writer(
            csvfile, delimiter=sep, quotechar="|", quoting=csv.QUOTE_MINIMAL
        )
        for row in rows:
            writer.writerow(row)
    return filename