Added method to delete objects (#33474)

This commit is contained in:
Anaconda
2019-03-03 21:25:52 +05:30
committed by Randell Dawson
parent d78db71f34
commit 76fd0ce297

View File

@ -96,6 +96,10 @@ x = Foo()
x.__privatenum # gives following error : 'Foo' object has no attribute '__privatenum' x.__privatenum # gives following error : 'Foo' object has no attribute '__privatenum'
``` ```
#### Delete Objects:
Objectes can be deleted by using ```del``` keyword.
## Simple class and Object Implementation ## Simple class and Object Implementation
```python ```python
class Friend: class Friend:
@ -109,5 +113,6 @@ class Friend:
fr1 = Friend("Nilesh","Bharti","Bihar") fr1 = Friend("Nilesh","Bharti","Bihar")
fr1.show() fr1.show()
del fr1
``` ```