Работа с файлами / Базовые операции

import os.path

file_name = "file.txt"
exists = os.path.exists(file_name)
print(exists)