1.

Which of the following statements create a dictionary?(a) d = {}(b) d = {“john”:40, “peter”:45}(c) d = {40:”john”, 45:”peter”}(d) All of the mentionedI had been asked this question by my school principal while I was bunking the class.Question is from Dictionary in division Dictionary, Functions and Built-in Functions of Python

Answer» RIGHT answer is (d) All of the mentioned

Explanation: DICTIONARIES are CREATED by specifying keys and VALUES.


Discussion

No Comment Found

Related InterviewSolutions