I\'m used to doing print >>f, \"hi there\"
print >>f, \"hi there\"
However, it seems that print >> is getting deprecated. What is the recommended way t
print >>
To write text in a file in the flask can be used:
filehandle = open("text.txt", "w") filebuffer = ["hi","welcome","yes yes welcome"] filehandle.writelines(filebuffer) filehandle.close()