So, I was wondering if there could be a way to use files from a dictionary with similar names in a loop,
I have this dictionaries:
dcm = {}
for filename
You can try iterate over dicts by zip()
function like example bellow. It gives you list with all functions for all files. But don't forget than len of all dicts should be equals
dcm = {'f1': 'path_to_file'}
out = {'f1': 'path_to_file'}
mtr = {'f1': 'path_to_file'}
IFOV = []
for d, o, m in zip(dcm, out, mtr):
IFOV.append(
gi.IFOV_generic(out[o], mtr[m], dcm[d], endpoint)
)