import os # Specify the directory path directory = '/path/to/your/directory' # Open the directory and view its contents contents = os.listdir(directory) # Print the contents of the directory for item in contents: print(item)