طرق قائمة على المذكرات في Python
- Previous Page Python List Methods
- Next Page Python Tuple Methods
Python يحتوي على مجموعة من الطرق المدمجة التي يمكن استخدامها في المذكرات.
Method | Description |
---|---|
clear() | Remove all elements from the dictionary |
copy() | Return a copy of the dictionary |
fromkeys() | Return a dictionary with the specified key and value |
get() | Return the value associated with the specified key |
items() | Return a list of tuples containing each key-value pair |
keys() | Return a list containing the keys of the dictionary |
pop() | Remove the element with the specified key |
popitem() | Remove the last inserted key-value pair |
setdefault() | Return the value associated with the specified key. If the key does not exist, insert a key with the specified value. |
update() | Update the dictionary with the specified key-value pair |
values() | Return a list of all values in the dictionary |
In our Python Dictionary Tutorial Learn more about dictionaries in Chinese.
- Previous Page Python List Methods
- Next Page Python Tuple Methods