Created
October 21, 2019 17:52
-
-
Save SpiralOutDotEu/21383538f330d80e4f068874b177a297 to your computer and use it in GitHub Desktop.
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
| import os | |
| def get_files(folder): | |
| for item in os.listdir(folder): | |
| full_item = os.path.join(folder, item) | |
| if os.path.isfile(full_item): | |
| yield full_item | |
| elif os.path.isdir(full_item): | |
| yield from get_files(full_item) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment