Learning Python at the moment. (coming from PHP)
In Python there's a delete(del
) function to delete your variables.
This is new to me,
What are the benefits of deleting a variable?
What are the drawbacks of not deleting a variable?
In what situation would I most likely want to delete a variable?
EDIT:
This question here just compares the differences between del var
and var = none
.
I'm trying to understand why you would need to delete a variable in the first place.