MCQs > IT & Programming > Python > Analyse the given Python language code and answer the question that follows. import collections fd = collections.defaultdict(lambda : '0') fdi'a'] = 1 fd['b‘] = 2 print (fd['a']+0) print (fd['c‘]) print (fd[‘b']+0) print (fd['d']) What will be the correct output of the above given code?

Python MCQs

Analyse the given Python language code and answer the question that follows.

import collections


fd = collections.defaultdict(lambda : '0')


fdi'a'] = 1


fd['b‘] = 2


print (fd['a']+0)


print (fd['c‘])


print (fd[‘b']+0)


print (fd['d'])


What will be the correct output of the above given code?


Answer

Correct Answer:

1


O


2



Explanation:

Note: This Question is unanswered, help us to find answer for this one

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it