I just keep learning stuff today. So if del deletes the keyword, not the object, calling del is kind of superfluous, unless the point is just to make sure that nothing can access that value before the function ends
If the name you’re deleting is the last remaining reference to the object, then the object will be deleted from memory too
I just keep learning stuff today. So if del deletes the keyword, not the object, calling del is kind of superfluous, unless the point is just to make sure that nothing can access that value before the function ends
If the name you’re deleting is the last remaining reference to the object, then the object will be deleted from memory too