Skip to content
Related Articles

Related Articles

Python-Quizzes | Python Dictionary Quiz | Question 15
  • Last Updated : 17 Sep, 2020

Question 15:Find the output of the following program:




temp = {'GFG' : 1
        'Facebook' : 2
        'Google' : 3
        
for (key, values) in temp.items(): 
    print(key, values, end = " "

(A) Google 3 GFG 1 Facebook 2
(B) Facebook 2 GFG 1 Google 3
(C) Facebook 2 Google 3 GFG 1
(D) Any of the above


Answer: (D)

Explanation: Dictionaries are unordered. So any key value pairs can be added at any location within a dictionary. Any of the output may come.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :