Hi, Explain how to delete a file in Python
If you want to delete a file in Python, you will have to import OS module first, and then call
For example, if you want to delete a file
File1.txt, the following piece of code will help:
import os os.remove("File1.txt")
Hope it is helpful!