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

1. {0: 0, 1: 0, 2: 0}

2. {0: 1, 1: 1, 2: 1}

3. {0: 0, 1: 0, 2: 0, 0: 1, 1: 1, 2: 1}

4. TypeError: Immutable object

  • b. {0: 1, 1: 1, 2: 1}
Subscribe Now

Get All Updates & News