Return dict with keys present in both dicts and values from the first. Example: {'a':1,'b':2}, {'b':3,'c':4} => {'b':2} Keys keep the order they have in the first dictionary.
Implement this function:
def dict_intersection(d1: dict, d2: dict) -> dict:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: d1, d2.
Input
{'a': 1, 'b': 2}
{'b': 3, 'c': 4}
Output
{'b': 2}