# Import the required module import os # Specify the path to your file file_path = "/path/to/your/file.py" # Check if the file exists if os.path.exists(file_path): # Open the file with open(file_path, 'r') as file: # Read and print each line for line in file: print(line, end='') else: print("The file does not exist.")