1/10
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
dict.keys()
Returns a list of dictionary keys of dict_keys type
dict.values()
Returns a list of dictionary values of dict_values type
dict.get(key, default)
For a given key, returns the value of the key or default if key not in dictionary
dict.items()
Returns a list of dict's tuple pairs (key, value)
dict.update(dict2)
Adds dictionary dict2's key:value pairs to dict
dict.fromkeys(seq, value)
Create a new dictionary with keys from seq (can be a list, tuple, set, string (seperates characters), range) and values set to value
dict.setdefault(key, default)
Similar to get(), but will set dict[key]=default if key is not already in dict
dict.copy()
Returns a copy of dictionary dict (the content of the dictionary is not copied by value, but just creates a new reference)
dict.clear
Removes all elements of dictionary dict
len(dict)
Returns the total length (or size) of the dictionary
str(dict)
Produces a printable string representation of a dictionary