Pythonは、現在のディレクトリ内のファイル名とフォルダ名を読み取ります

import os 


print(os.listdir( "。"))

おすすめ

転載: blog.csdn.net/jidawanghao/article/details/112369862