From 76fd0ce297d314f32a6459b1ca27e9da6c7de54e Mon Sep 17 00:00:00 2001 From: Anaconda <40523848+python292@users.noreply.github.com> Date: Sun, 3 Mar 2019 21:25:52 +0530 Subject: [PATCH] Added method to delete objects (#33474) --- guide/english/python/class/index.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/guide/english/python/class/index.md b/guide/english/python/class/index.md index 2e1c6e9969..54ea1ab2a2 100644 --- a/guide/english/python/class/index.md +++ b/guide/english/python/class/index.md @@ -96,6 +96,10 @@ x = Foo() 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 ```python class Friend: @@ -109,5 +113,6 @@ class Friend: fr1 = Friend("Nilesh","Bharti","Bihar") fr1.show() +del fr1 ```