Write a Python function called omit(mapping, keys) that returns a new object with all key-value pairs from…
Write a Python function called omit(mapping, keys) that returns a new object with all key-value pairs from…: a task in repo2rlenv-r2e (Harbor dataset). Behavior requirements: - The return type must match the type of mapping : - If mapping is a plain dict , return a dict . - If mapping is a…
The task
Behavior requirements: - The return type must match the type of `mapping`: - If `mapping` is a plain `dict`, return a `dict`. - If `mapping` is a `defaultdict`, return a `defaultdict` with the same default factory, containing only the non-omitted pairs. - If `mapping` is a list of `(key, value)` tuples, return a list…
Part of FineEnvs/repo2rlenv-r2e.