Note: We will import the os library and use the os.remove () function to remove the required file. If you don’t have the os library, open command line and write pip install os to install the required os library.
Below is the Python implementation & # 8212 ;
|
Output:
Required file to delete: < br />
Sample Program Run
When we enter the file name to delete:
Deletion:
Working: