Step to delete a File or Folder in Python

Sometime we have to delete a file or folder/directory in python. Either its empty or contain anything, please find the following steps,

Step to delete a File or Folder in Python

To remove a file:

To remove an empty directory/folder:

To remove a directory and all its contents:

The following two tabs change content below.
I am Karthik, software engineer by profession. You can find and follow me, from Social Media or here. Google+

Latest posts by karsho (see all)

This entry was posted in General, Python.

Leave a Reply

Your email address will not be published. Required fields are marked *

Please Fill this Sum * Time limit is exhausted. Please reload the CAPTCHA.