Last active
March 20, 2022 07:38
-
-
Save jeangjenq/6c7f8e780483d47e3ee611b3db69ff23 to your computer and use it in GitHub Desktop.
List all directory, subdirectory and files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
l = [] | |
for root, directories, filenames in os.walk('./'): | |
for directory in directories: | |
l.append(os.path.join(root, directory)) | |
for filename in filenames: | |
l.append(os.path.join(root, filename)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment