venture of iit bombay vjti alumni os getcwd(the rmdir(method the rmdir(method deletes the directorywhich is passed as an argument in the method before removing directoryall the contents in it should be removed syntax os rmdir('dirname'example following is the example to remove "/tmp/testdirectory it is required to give fully qualified name of the directoryotherwise it would search for that directory in the current directory #!/usr/bin/python import os this would remove "/tmp/testdirectory