HOW TO LIST FILES IN A DIRECTORY?

Home Forums Python Course Forum File Handling HOW TO LIST FILES IN A DIRECTORY?

Viewing 0 reply threads
  • Author
    Posts
    • training@h2kinfosys.com
      Keymaster
      (124.123.164.108)

        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.

        #18498

    Viewing 0 reply threads
    • You must be logged in to reply to this topic.