我试图在Python中找到最近修改过的(从此处开始'最新')特定类型的文件.我现在可以获得最新版本,但无论哪种类型都无关紧要.我想只获得最新的MP3文件.
目前我有:
import os newest = max(os.listdir('.'), key = os.path.getctime) print newest
有没有办法修改它只给我最新的MP3文件?
python file-io
file-io ×1
python ×1