0 votes
in Python by
What is a dictionary in Python? Give an example

1 Answer

0 votes
by

A Python dictionary is a collection of items in no particular order. Python dictionaries are written in curly brackets with keys and values. Dictionaries are optimised to retrieve value for known keys.

Example of Dictionary :

d={“a”:1,”b”:2}

...