Dictionary in Python

Dictionary in Python

A dictionary is a collection of key:value pairs which are unordered, changeable and indexed. In Python, dictionaries are written with curly brackets, and they have keys and values in them.


Dictionaries are sometimes called as associative arrays in other languages such as PHP.


The main operation on a dictionary is storing a value with some key and extracting the value through a key. It is also possible to delete a key:value pair using del keyword. If you use the same key for storing a different ...

 •  0 comments  •  flag
Share on Twitter
Published on August 15, 2020 10:10
No comments have been added yet.