Created
October 1, 2018 18:01
-
-
Save ardenn/ce9c271b81b9a9c7755c473b097aa6be to your computer and use it in GitHub Desktop.
Python Dictionaries Tutorial - Deletion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
del job2["salary"] | |
del job2["available"] | |
print(job2) #return a dictionary without 'salary' and 'available' entries | |
job1.clear() | |
print(job1) #return an empty dictionary | |
del job1 | |
print(job1) # return NameError |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment