Python Dictionaries
Function Description
len (object) -> int Determines how many items a dictionary has.
[Link]() -> object Returns a list of all the values in the dictionary.
[Link]() -> object Returns a list containing the dictionary's keys.
[Link]() -> object Returns a list containing a tuple for each key
value pair.
[Link](key, default = None) Returns the value of the specified key.
[Link]() Removes all the elements from the dictionary.
[Link](key) -> value Removes specified key and returns the
corresponding value.
Kuala Lumpur, Malaysia, phone: +601160906599, e-mail:academysamer@[Link]
Keyword Description
del keyword removes the item with the specified key name
Assume: dict_1 = {"course": "Python", "level": "beginner"}
Dictionaries Operators Description Example Result
in "level" in dict_1 True
not in Membership "course" not in dict_1 False
For more info about python dictionaries visit:
[Link]
To find out more about Python, web development, and data science visit us on:
Kuala Lumpur, Malaysia, phone: +601160906599, e-mail:academysamer@[Link]