can you please tell me how to shorten the writing of the iterating loop in one line without writing join(path, name) twice? Maybe it can be implemented through lambda? Does my example calculate the path twice? Thanks
import os
from os.path import exists, join
path = r"C:\Test_folder\\"
name_list = ["image01.png", "image02.png", "image03.png"]
result = [join(path, name) for name in name_list if exists(join(path, name))]