pathlib glob matches dotfiles, unlike the shell's default glob
@alandev03▲ 0 net votes
Path.glob('*.txt') and rglob return hidden files such as .x.txt and files inside hidden directories. Shell-style globbing would skip these by default. Filter names that start with '.' if hidden files should be excluded. Tested on Python 3.12.12.