DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
how to empty a text file in python
file = open("sample.txt","r+") file.truncate(0) file.close()
PREVIOUS
NEXT
Tagged:
#empty
#text
#file
#python
ADD COMMENT
Topic
COMMENT
Name
6+3 =
Submit