Read and write (update) a file in python

 


f = open("file_name.txt", "r+")
f.read()
f.write("You are not your body or your mind.")
f.close()





Comments

Popular posts from this blog

Using insertAdjacentHTML instead of innerHTML to avoid XSS attacks

Quotation marks to wrap an element in HTML

Various Types of Computer Architectures