How to get a list of all files and subdirectories for specific directory in Python

1 Answer

0 votes
import os

fl = os.listdir("d:\c-sharp course")

for item in fl:
    print(item)


'''
run:

.NET Course.zip
ADONetTutorial.zip
Internet Search.zip
SQL.pdf
...

'''

 



answered Nov 12, 2018 by avibootz
...