python hapus gambar yang disimpan

import os
os.remove(file) for file in os.listdir('path/to/directory') if file.endswith('.png')
Robin R