A

Admin • 833K Points
Coach

Q. Which function lists all files in a directory?

  • (A) os.listdir()
  • (B) os.showfiles()
  • (C) list.files()
  • (D) os.scan()
  • Correct Answer - Option(A)
  • Views: 25
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

os.listdir() returns a list of all files and folders in the specified directory.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.