📅  最后修改于: 2022-03-11 14:45:11.804000             🧑  作者: Mango
# Program to append to text file using write() function
with open("python.txt", "a") as file:
content = "Append the content at the end \n"
file.write(content)
file.close()
# Program to read the entire file (absolute path) using read() function
with open("C:/Projects/Tryouts/python.txt", "r") as file:
content = file.read()
print(content)
file.close()