Opening and Writing files (Python)

1
2
fw = open("myfile.txt", "w") # For writing only
fw.write("I inserted something in this file\n")
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Using FR (file read) and FW (file write) to do simple output/input operations with files using python.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.