2.5

import os
folder_path = (r'D:\Programs\Python\Python37' )
fn = [filename for filename in os.listdir(folder_path)
if filename.endswith(('.exe', '.py'))]
print(fn)

posted @ 2024-10-27 23:02  世梦  阅读(20)  评论(0)    收藏  举报