I am fond of the Pathlib library, where it's pretty elegant and straight to the point.
import os.path
# Method 1: os.path.isfile() - specifically for files (not directories)
if os.path.isfile("file.txt"):
print("File exists")
# Method 2: pathlib (Python 3)
from pathlib import Path
if Path("file.txt").exists():
print("File exists")
See the difference?