iterdir()

The Path method that yields the entries, files and folders, inside a directory.

In more detail

The entries come in no particular order, so sort them if the order matters. Use Path.glob("*.py") to list only matching names.

Related terms

Taught in

References