圖片擴展名檢索,路徑問題
def is_jpg_file(filename):
return any(filename.endswith(extension) for extension in ["jpg","jpeg","png","bmp"])
filename = [x for x in os.listdir(' filepath') if is_jpg_file(x)]
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/386864.html
標籤:其他
上一篇:pycharm,python模板
