📅  最后修改于: 2022-03-11 14:46:20.045000             🧑  作者: Mango
import os
directory = 'the/directory/you/want/to/use'
for filename in os.listdir(directory):
if filename.endswith(".txt"):
#do smth
continue
else:
continue