Keep dict items where value is between lo and hi inclusive. Entries keep the order they have in the input dictionary.
Implement this function:
def filter_by_value_range(d: dict, lo: int, hi: int) -> 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: d, lo, hi.
Input
{'a': 1, 'b': 5, 'c': 10, 'd': 15}
3
12
Output
{'b': 5, 'c': 10}