Simplest/Idiomatic way to count files in a directory (using pathlib)

Laura Creighton lac at openend.se
Tue Jun 23 07:21:19 EDT 2015


I use len(list(self.path.iterdir()))

You get an extra list created in there.  Do you care?

Laura




More information about the Python-list mailing list