Question: How do I delete a file or folder?

Answer: 
Use 

```
shutil.rmtree(path[, ignore_errors[, onerror]])

```

(See complete documentation on [shutil](http://docs.python.org/library/shutil.html)) and/or

```
os.remove

```

and

```
os.rmdir

```

(Complete documentation on [os](http://docs.python.org/library/os.html#os.remove).)
I recommend using `subprocess` if writing a beautiful and readable code is your cup of tea:

```
import subprocess
subprocess.Popen("rm -r my_dir", shell=True)

```

And if you are not a software engineer, then maybe consider using Jupyter; you can simply type bash commands:

```
!rm -r my_dir

```

Traditionally, you use `shutil`:

```
import shutil
shutil.rmtree(my_dir) 

```