Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

clearing all text from a file in python

fileVariable = open('textDocName.txt', 'r+')
fileVariable.truncate(0)
fileVariable.close()
 
PREVIOUS NEXT
Tagged: #clearing #text #file #python
ADD COMMENT
Topic
Name
4+4 =