Report Bug
Qus :

What will be the output of the following Python code?

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

Qus

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

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


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


Solution
B. a b c



Explanation
Loops over the keys and prints the values.



Report Bug