[PYTHON] Erase image files at once with one liner

import glob
import os

map(os.remove, glob.glob("*.jpg "))

Is this the best

Python 3.x Must be list (map (os.remove, glob.glob ("* .jpg "))) It's pretty hard ...

Recommended Posts

Erase image files at once with one liner
Convert multiple proto files at once with python
Rsync multiple files at once
Sorting image files with Python (2)
Sorting image files with Python (3)
Sorting image files with Python
[Python] Send gmail with python: Send one by one with multiple image files attached
Replace all at once with sed
Convert memo at once with Python 2to3
Send newsletters all at once with Gmail
One liner webServer (with CGI) in python
Erase & generate serial number files with shell script
One liner to make Lena images with scipy
Update multiple tables at once with pandas to_sql
Upgrade all at once including dependencies with pip
Get corporate number at once via gbizinfo with python
Extract the table of image files with OneDrive & Python
Beginners try to convert Word files to PDF at once
Limits that can be analyzed at once with MeCab
Generate multiple HTML files at once by pouring JSON data into an HTML template with Python