I'm wondering how to rewrite this to make it more readable, so I and perhaps others can understand it without any confusion in the future:
d1 = {'a':True, 'b':False, 'c':True}
d2 = {'a':False, 'b':True, 'c':True}
# wanted output: False if either value is False, True only if both are True
# d3 = {'a':False, 'b':False, 'c':True}
d3 = {key: (d1[key] and d2[key]) for key in d1}
I'm not looking for the most possible verbose version, but just what is clear and human readable.