In this python dictionary program, we will display different combinations of letters from dictionary values.
Steps to solve the program
import itertools
d ={'x':['e','f'],'y':['a','b']}
for combi in itertools.product(*[d[char] for char in sorted(d.keys())]):
print(''.join(combi))
Output :
ea
eb
fa
fb