« * K @lernerpython.com

Reuven M. Lerner @lernerpython.com

2026-12-02 16:30 UTC

Want files in a directory that match a pattern? Use #Python's glob and get strings (filenames). Or use the "glob" method in pathlib: from pathlib import Path p = Path('/etc/') for one_result in p.glob('*.conf'): print(f'{one_result=}', end=' ')

1 picture (not shown on this phone)

1 likes, 0 reposts, 0 replies

3 Next post4 More from @lernerpython.comBackBluesky home
☆ Save to home · 0 Home · Find · Games · Chat · AI · Setup