0 votes
in Python Flask by
How can files be deleted in Python?

1 Answer

0 votes
by
You need to import the OS Module and use os.remove() function for deleting a file in python.

consider the code below:

import os

os.remove("file_name.txt")

Related questions

0 votes
asked Apr 17 by DavidAnderson
0 votes
asked May 12, 2023 in Python Flask by SakshiSharma
...