How to check if file exists Python 3

Python 3 way is to use pathlib:

from pathlib import Path
file_name = Path("/path/to/file")
if file_name.is_file():
    print("File exists")
    print("File is missing")

Universal way to test files specifically (no directories) that works both in Python 3 and Python 2.7:

import os.path

Alernatively, to test files and directories both in Python 3 and Python 2.7 one can do:

import os.path

Minimum Requirements and How-to:

Python3, Pip3