writelines file code example
Example 1: python writelines
f = open("demofile3.txt", "a")
f.writelines(["See you soon!", "Over and out."])
f.close()
Example 2: R writeLines to file
fileConn<-file("output.txt")
writeLines(c("Hello","World"), fileConn)
close(fileConn)