import os def s(path): file_list=os.listdir(path) for file in file_list: print(os.path.realpath(file))
输出
s("/Users/xiangyong/PycharmProjects/11-13")