• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in Python by
Q:
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 in Python by SakshiSharma
+1 vote
asked Feb 13 in Python by SakshiSharma
...