FOMO Daily
Feed
Real Pythonยท

Quiz: How to Get a List of All Files in a Directory With Python

Languages & ToolingPythonpathlibFile Systems

TL;DR

This 10-question quiz tests how to list and filter files in Python, from a single directory to an entire directory tree. It covers .iterdir(), .glob(), .rglob(), attribute filtering, and skipping unwanted directories, then provides a score to check your understanding.

Read the original post Sign in to mark as read or skip