Home › Forums › Python Course Forum › File Handling › HOW TO LIST FILES IN A DIRECTORY?
Tagged: os.listdir(), os.walk()
In python, listing files in a directory requires os.listdir() which helps you in getting all the files and directories. Also, use os.walk() in case of listing the root directory, subdirectory, and current directory file names in a directory tree.
Username or Email Address
Password
Remember Me