Of course, you can. Best Practice: Working with Paths in Python The problem: listing folders and drives . Moreover, since this isn’t at all complicated, I’d like to take this case to illustrate key best practices recommended for working with paths on drives.
Python 3.4 introduced a new standard library for dealing with files and paths called pathlib — and it’s great!
Recently while working on a project, a colleague asked whether one could list the content of drives in Python.