Q. Which function lists all files in a directory?
β
Correct Answer: (A)
os.listdir()
Explanation: os.listdir() returns a list of all files and folders in the specified directory.