Report Bug
Qus :

What will be the output of the following Python code?

d = {0: 'a', 1: 'b', 2: 'c'}
for x in d.values():
    print(d[x])

Qus

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

d = {0: 'a', 1: 'b', 2: 'c'}
for x in d.values():
    print(d[x])


A. 0 1 2
B. a b c
C. 0 a 1 b 2 c
D. none of the mentioned


Solution
D. none of the mentioned



Explanation
Causes a KeyError.



Report Bug