Removing empty directories >>> import os >>> os.listdir() ['example.txt'] >>> os.rmdir('example.txt') >>> os.listdir() Removing non-empty directories...
how to
To create a new directory Python has a function mkdir( ) built into os module.