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
Username
Email
Mobile:
Password: Confirm Password:
Want to become an instructor ?
Demo Class YouTube URL Upload your demo class video in YouTube and provide YouTube URL here
Registration confirmation will be emailed to you.
Enter the destination URL
Or link to existing content