def merge_dictionaries(a, b):
res = {}<EOL>for k in a:<EOL><INDENT>res[k] = a[k]<EOL><DEDENT>for k in b:<EOL><INDENT>res[k] = b[k]<EOL><DEDENT>return res<EOL>
Merge two dictionaries; duplicate keys get value from b.