DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
3+1 =
Submit