with open(file, "w") as f:
      f.write("\n".join(str(v) for v in vals) + "\n")