0
Which command deletes pictures? Answer quickly, please.
2 Antworten
+ 1
TurtleShell os.system("rm *.jpg"), for example?
0
An image is just a normal file so
import os
os.remove("file path/file name")
If it’s a directory with images and you want to delete them all then this will be better
import shutil
shutil.rmtree("dir path/dir name")