KnowledgeBoat Logo
|

Computer Science

Which of the following is correct with respect to above Python code ?

d = {"a" : 3,"b" : 7}
  1. a dictionary d is created.
  2. a and b are the keys of dictionary d.
  3. 3 and 7 are the values of dictionary d.
  4. All of these.

Python Dictionaries

1 Like

Answer

All of these.

Reason — The dictionary d has two key-value pairs where a and b are the keys and 3 and 7 are the values respectively. Therefore, all the statements are correct.

Answered By

1 Like


Related Questions