Q. What is the output of the following program?
Code:
D = dict() for i in range (3): for j in range(2): D[i] = j print(D)
β
Correct Answer: (B)
{0: 1, 1: 1, 2: 1}
D = dict() for i in range (3): for j in range(2): D[i] = j print(D)
You must be Logged in to update hint/solution