delExpert Playground

Deletes a variable, list item, dictionary entry, or object attribute

Python Playground
Output
Click "Run" to execute your code

del compiles to different opcodes depending on the target: DELETE_FAST/DELETE_NAME for variables, DELETE_SUBSCR for items, DELETE_ATTR for attributes. Each triggers different internal protocols.

Challenge

Try modifying the code above to explore different behaviors. Can you extend the example to handle a new use case?