Delete an element from a dictionary

  1. How do I delete an item from a dictionary in Python?
  2. Without modifying the original dictionary, how do I obtain another dictionary with the item removed?

See also How can I remove a key from a Python dictionary? for the specific issue of removing an item (by key) that may not already be present.

← Назад к списку