reorg and add code for second edition

This commit is contained in:
Aditya Bhargava
2023-08-09 08:20:19 -05:00
parent 9306432a1b
commit 933acafaf3
89 changed files with 18 additions and 117 deletions

View File

@@ -0,0 +1,18 @@
from os import listdir
from os.path import isfile, join
def printnames(dir):
# loop through every file and folder in the current folder
for file in sorted(listdir(dir)):
fullpath = join(dir, file)
if isfile(fullpath):
# if it is a file, print out the name
print(file)
else:
# if it is a folder, call this function recursively on it
# to look for files and folders
printnames(fullpath)
printnames("pics")