2.5.1

程序文件ex2_5_1.py

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

posted @ 2024-10-14 10:15  qi11  阅读(3)  评论(0编辑  收藏  举报