Update a dict with part of another dict
You could do it like this:
keys = ['key1', 'key2', 'key3']
dict1.update((k, dict2[k]) for k in keys)
There is no built-in function I know of, but this would be a simple 2-liner:
for key in ('key1', 'key2', 'key3'):
dict1[key] = dict2[key] # assign dictionary items