import os file_exists = os.path.exists("example.txt") # Returns boolean representing whether or not the file exists