Created
July 19, 2017 14:38
-
-
Save vihar/042db8bbea7a3aa7c472960a33f175c2 to your computer and use it in GitHub Desktop.
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
code_name = {"jack": 4098, "sape": 4139, "robb": 2323} | |
print(type(code_name)) | |
print(code_name) | |
# You can remove items in the dictionary by using the del keyword. | |
del code_name["sape"] | |
print(code_name) | |
""" | |
You can update the values of the dictionaries by overriding them. | |
code_name[‘jack’] = 1212 | |
""" | |
# The len function returns the number of key-value pairs in the dictionary. | |
len(code_name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment