I have two lists of tuples
keys = [(0,1), (2,1)]
values = [('a','b'), ('c','d')]
I want to make a dictionary dict
that will apply a function f1
to each
dict.keys[i] = keys[i][0], keys[i][i]: f1(keys[i][0],keys[i][1])
And for the values of the dictionary, I would like to be tuples
dict.values[i] = (f2(values[i][0]), f2(values[i][1]))
What is the most efficient way of doing that in one pass in a pythonic way?