Remove empty folder in Python

Os module provides the function to remove folder if its empty.

import os
os.rmdir(folder)

Where 'folder' is the name of the folder that need to be removed.

Leave a Reply

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