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