Pythonフォルダおよびサブファイル内のすべてのファイル名を取得
684 ワード
# _*_ coding: utf-8 _*_
# @Author :GengYu
# @Create_time :2020/4/23 7:02
# @Email :[email protected]
# @File_name :getName.py
import os
list_name = []
for i in os.walk(os.getcwd()):
for n in i[2]:
list_name.append(n)
str = ','
print(str.join(list_name))
# _*_ coding: utf-8 _*_
# @Author :GengYu
# @Create_time :2020/4/23 7:02
# @Email :[email protected]
# @File_name :getName.py
# @Software :PyCharm
import os
list_name = []
for i in os.walk(os.getcwd()):
for n in i[2]:
list_name.append(n)
str = ','
print(str.join(list_name))