Using glob.glob() in Python

Published: 20 August 2026
on channel: EasyDataScience
82
0

The Python glob.glob() function is a built-in tool used to search the file system and find all pathnames matching a specified pattern based on Unix shell wildcard rules. Instead of manually looping through directories and checking string names, glob.glob() handles the filtering natively and returns matching files and folders as a Python list.
Core Wildcards
The pattern matching relies on a few fundamental wildcards rather than complex regular expressions:
*– Matches zero or more characters in a single directory level.
? – Matches exactly one character.
[seq] – Matches any character listed inside the brackets (e.g., [0-9] matches any digit).
** – Matches all directories, subdirectories, and files when combined with the recursive=True

#python
#glob
#easydatascience2508


On this page of the site you can watch the video online Using glob.glob() in Python with a duration of hours minute second in good quality, which was uploaded by the user EasyDataScience 20 August 2026, share the link with friends and acquaintances, this video has already been watched 82 times on youtube and it was liked by 0 viewers. Enjoy your viewing!