sprawdzanie ścieżki to plik
from pathlib import Path
my_file = Path("/path/to/file")
if my_file.is_file():
# file exists
Super Shrew
from pathlib import Path
my_file = Path("/path/to/file")
if my_file.is_file():
# file exists