Python directory searching and organizing by dict
问题 Hey all, this is my first time recently trying to get into the file and os part of Python. I am trying to search a directory then find all sub directories. If the directory has no folders, add all the files to a list. And organize them all by dict. So for instance a tree could look like this Starting Path Dir 1 Subdir 1 Subdir 2 Subdir 3 subsubdir file.jpg folder1 file1.jpg file2.jpg folder2 file3.jpg file4.jpg Even if subsubdir has a file in it, it should be skipped because it has folders in