Login
Remember
Register
Ask a Question
Which command is used to delete files in Python?
0
votes
asked
May 16, 2020
in
Python
by
Robindeniel
Which command is used to delete files in Python?
#python-delete-file
#delete-file-python
Python-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
May 16, 2020
by
SakshiSharma
OS.unlink(filename) or OS.remove(filename) are the commands used to delete files in Python Programming.
Example:
1
2
import OS
OS.remove("abc.txt")
...