25 November 2021

delete a Python object with the del statement

Python del Statement

In Python, you can use the del statement to destroy an object. The syntax is simple: For example, let’s create a variable and delete it: Output: What Can Be Deleted with ‘del’ in Python? In Python, everything is an object. The del statement can be used to delete objects. Thus you can delete almost anything

Python del Statement Read More »