M

Mr. Dubey • 52.48K Points
Coach

Q. What is the output of the following program?
D = dict()
for i in range (3):
for j in range(2):
D[i] = j
print(D)

  • (A) {0: 0, 1: 0, 2: 0}
  • (B) {0: 1, 1: 1, 2: 1}
  • (C) {0: 0, 1: 0, 2: 0, 0: 1, 1: 1, 2: 1}
  • (D) TypeError: Immutable object
  • Correct Answer - Option(B)
  • Views: 94
  • Filed under category Python

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics