Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to delete everything on a file python

f = open('file.txt', 'r+')
f.truncate(0) # need '0' when using r+
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #delete #file #python
ADD COMMENT
Topic
Name
3+1 =