remove all the valu ein dict exacpt provided key pythn code example
Example: remove all the valu ein dict exacpt provided key pythn
exclude_keys = ['exclude', 'exclude2']
new_d = {k: d[k] for k in set(list(d.keys())) - set(exclude_keys)}
exclude_keys = ['exclude', 'exclude2']
new_d = {k: d[k] for k in set(list(d.keys())) - set(exclude_keys)}