Delete directory in Python

Check if directory exists and if yes, then delete it.


Interactive recipe

You can use below interactive recipe to generate code. This recipe is available in MLJAR Studio.

Python code

# Python code will be here

Code explanation

  1. Check if directory exists in the file system.
  2. Delete directory if present.
Copy file