Wyszukaj podfoldery rense przy użyciu Python modułu glob.glob

There's a lot of confusion on this topic. Let me see if I can clarify it (Python 3.7):

glob.glob('*.txt')                  :matches all files ending in '.txt' in current directory
glob.glob('*/*.txt')                :same as 1
glob.glob('**/*.txt')               :matches all files ending in '.txt' in the immediate subdirectories only, but not in the current directory
glob.glob('*.txt',recursive=True)   :same as 1
glob.glob('*/*.txt',recursive=True) :same as 3
glob.glob('**/*.txt',recursive=True):matches all files ending in '.txt' in the current directory and in all subdirectories
So it's best to always specify recursive=True.
DreamCoder