The Python Glob Module

A tutorial for filename matching in Python

Tara (Boyle) Hunter
Towards Data Science
4 min readJan 16, 2021

--

The glob module is a useful part of the Python standard library. glob (short for global) is used to return all file paths that match a specific pattern.

We can use glob to search for a specific file pattern, or perhaps more usefully, search for files where the filename matches a certain pattern by using wildcard characters.

--

--

I’m passionate about all things data! I’m interested in leveraging data to create business solutions.