deleting the directory using os python\ code example
Example 1: creating a new folder in python
newpath = r'C:\Program Files\arbitrary'
if not os.path.exists(newpath):
os.makedirs(newpath)
Example 2: how to get all folders on path in python
os.walk(directory)
[x[0] for x in os.walk(directory)]