Python Basics — Day 12 File I/O in Python
01. Opening a File
f = open("test.txt", "w") # Open file
f.write("Hello File!") # Write content
f.close() # Close file
open("filename", "mode")
"w" : Write (overwrites existing content)
"a" : Append (add new content at th...
sabinsim.hashnode.dev2 min read