Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python delete text in text file

# Delete all text in a text file
f = open("text_file.txt", "r+")
f.truncate(0)
f.close()
Source by www.kite.com #
 
PREVIOUS NEXT
Tagged: #python #delete #text #text #file
ADD COMMENT
Topic
Name
1+1 =