0

A new file is generated here? Why not use append for adding some statements?

file = open("newfile.txt", "w") file.write("This has been written to a file") file.close() file = open("newfile.txt", "r") print(file.read()) file.close()

1st Sep 2019, 8:38 AM
Shekhar Sharma
Shekhar Sharma - avatar
1 Resposta