📅  最后修改于: 2022-03-11 14:45:55.305000             🧑  作者: Mango
import os
dir = os.fsencode(filename='img') # here 'img' should be replaced with
# desired directory
lst = []
for items in os.listdir(dir):
lst.append(items)
print(lst)