Python Program to Append to a File, What is Append in Python, Why We Use Append in Python
#Append to a File in python
#content of myfile.txt is
#welcome
# open the file with access mode "a"
with open("myfile.txt", "a") as f:
f.write("new text")
Output:
The content of the file after appending a text to it is:
welcomenew text
About The Author
Shailendra Bramhvanshi, Founder at Techaroha Solutions Private Limited and CEO at Newtum Solutions Private Limited. BlockChain Experts with 12 years of IT Experience in of all aspects of running Organization and Project Management. I have created different coins to help the business to bring more trust. Recently deployed a stable coin in India TrueINR and working on few cryptocurrency exchanges. My Team is being rated as a top 10 blockchain service provider in India by Silicon India