delIntermediate Playground

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

Python Playground
Output
Click "Run" to execute your code

del can target slices, object attributes, and dict keys. Custom classes can control deletion behavior via __delitem__ and __delattr__.

Challenge

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