Skip to main content

Writing and Appending File in Python

 






# s = open("ak1.txt","w")
# s.write("What's up")

# s = open("ak1.txt","a")
# a= s.write("What's up\n")
# print(a)


f = open("ak1.txt","r+")
print(f.read())
f.write("thank you\n")
f.close





Comments