How will you create a dictionary in python?

Hi i need to know how will create a dictionary in python

2 Likes

To create a dictionary in Python put the placing items separated by commas.

Each item has a key and its respective value. It is expressed as:

(key:value)

Although the values may be of any data type and may be repeated, the keys must be of an immutable type (string, number or tuple of immutable components) and must be specific.

  thisdict = {
 "brand": "Samsung",
 "model": "Galaxy Note 9",
 "year": 2018
  }
1 Like