Pathlib Check adalah file

from pathlib import Path

my_file = Path("/path/to/file")
if my_file.is_file():
    # file exists
Super Shrew