Home » Programming Language (coding) » Python MCQs » What will be the output of the following Python code? d = {“john”:40, “peter”:45} d[“john”]

What will be the output of the following Python code? d = {“john”:40, “peter”:45} d[“john”]

What will be the output of the following Python code?

d = {"john":40, "peter":45}
d["john"]

A. 40
B. 45
C. “john”
D. “peter”

Answer: A. 40

Take Part in Discussion:

Your email address will not be published.

Solve : *
13 − 3 =