Important Notice:

Course Content
Dictionary in Python (Chapter-9) M3-R5
About Lesson

Deleting Dictionary:-

            Dictionary को delete करने के लिए del keyword का उपयोग किया जाता है

a={50:’Aman’, 51:’Raman’, 52:’Suman’}

print(a)                             # {50: ‘Aman’, 51: ‘Raman’, 52: ‘Suman’}

del a

print(a)                              # NameError: name ‘a’ is not defined

 

 

Deleting Dictionary:-

            del keyword is used to delete the dictionary.

a={50:’Aman’, 51:’Raman’, 52:’Suman’}

print(a)                             # {50: ‘Aman’, 51: ‘Raman’, 52: ‘Suman’}

del a

print(a)                              # NameError: name ‘a’ is not defined

error: Content is protected !!