DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python open file for reading and writing
with open(filename, "r+") as f: data = f.read() f.seek(0) f.write(output) f.truncate()
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#python
#open
#file
#reading
#writing
ADD COMMENT
Topic
COMMENT
Name
7+9 =
Submit