Skip to content

Instantly share code, notes, and snippets.

@vihar
Created July 19, 2017 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vihar/042db8bbea7a3aa7c472960a33f175c2 to your computer and use it in GitHub Desktop.
Save vihar/042db8bbea7a3aa7c472960a33f175c2 to your computer and use it in GitHub Desktop.
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