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}

Related questions

+1 vote
asked Feb 13, 2021 in Python by SakshiSharma
0 votes
0 votes
asked Feb 11, 2021 in Python by SakshiSharma
...