os.walk()
1 min readSep 14, 2020
Ref: StackOverflow
import os.path
path=input(" enter the path\n")
for path,subdir,files in os.walk(path):
for name in subdir:
print os.path.join(path,name) # will print path of directories
for name in files:
print os.path.join(path,name) # will print path of files