Vidyalelo
Python · Q32

MCQs for Python Dictionaries: Exam

Programming · Python · question 32

Q32

What will be the output of the following Python code? >>> a= >>> a.fromkeys([1,2,3],"check")

A.
Syntax error
B.
{1:"check",2:"check",3:"check"}
Answer
C.
"check"
D.
{1:None,2:None,3:None}

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board