how to delete all files from a directory in python code example
Example: delete contents of directory python
import os
import glob
files = glob.glob('/YOUR/PATH/*')
for f in files:
os.remove(f)
import os
import glob
files = glob.glob('/YOUR/PATH/*')
for f in files:
os.remove(f)