Dictionary in python



Dictionary is a unorder collection with key and value pairs.








Methods



S.No Methods Explain
clear() To empty the dictionary.
copy() To copy the data from one dictionary to another dictionary.
fromkeys() To combine the two inputs.
get() It will return the value of that key.
items() To return the dictionary data in the list.
key() To return only the dictionary key in the list.
pop() To remove the last value in the list.
popitem() To remove the last value in the list.
update() To update the items in the dictionary.
values() To return only the dictionary value in the list.