Home » Programming Language (coding) » Python MCQ » 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

Leave a Reply

Your email address will not be published. Required fields are marked *

Solve : *
29 × 19 =