os remove entire folder python

import os
import shutil

os.remove('https://cdn.myedukit.com/your/path/to/file.txt') #removes a file.

os.rmdir('/your/folder/path/') #removes an empty directory.

shutil.rmtree('/your/folder/path/') #deletes a directory and all its contents.

Here is what the above code is Doing:
1. The first line removes a file.
2. The second line removes an empty directory.
3. The third line deletes a directory and all its contents.