Home / Engineering / Problem Solving and Python Programming / Question

M

Mr. Dubey • 51.17K Points
Coach

Q.) ,"D") print(a)

(A) {1: ‘a’, 2: ‘b’, 3: ‘c’, 4: ‘d’}
(B) none
(C) error
(D) [1,3,6,10]
Correct answer : Option (A) - {1: ‘a’, 2: ‘b’, 3: ‘c’, 4: ‘d’}

Explanation:
 setdefault() will set dict[key]=default if key is not already in the dictionary.

Share

Discusssion

Login to discuss.