0
How to write in the file 2,3 etc. strings?
3 Respuestas
0
What file, is the file the python file? Is it a file you're opening?
I'm gonna just guess you mean write a text file, since your question is ambiguous.
Here's a basic example:
file = open("test.txt" "a")
file.write("0,1,2,3,4,5,6,7,8,9" + "\n")
file.close()
0
thank you , it is helpful
0
if you use : with open('text.txt,'w') as file; instead of: file=open function you will not need to close file; with open closes file by itself