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")
...