Report Bug

Qus

What will be the output of the following Python code snippet?

numbers = {}
letters = {}
comb = {}
numbers[1] = 56
numbers[3] = 7
letters[4] = 'B'
comb['Numbers'] = numbers 
comb['Letters'] = letters
print(comb)
Qus

निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?

numbers = {}
letters = {}
comb = {}
numbers[1] = 56
numbers[3] = 7
letters[4] = 'B'
comb['Numbers'] = numbers 
comb['Letters'] = letters
print(comb)


A. Error, dictionary in a dictionary can’t exist
B. ‘Numbers’: {1: 56, 3: 7}
C. {‘Numbers’: {1: 56}, ‘Letters’: {4: ‘B’}}
D. {‘Numbers’: {1: 56, 3: 7}, ‘Letters’: {4: ‘B’}}


Solution
D. {‘Numbers’: {1: 56, 3: 7}, ‘Letters’: {4: ‘B’}}



Explanation
Dictionary in a dictionary can exist.
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad