Code: d = {1:2, 2:3, 3:4} d.pop(2) print(d) {1:2, 3:4} {2:3, 3:4} {1: , 2:3, 3:4} {1:2, :3, 3:4} The pop() operation in dictionary pops the key value pair for the key value provided in the pop argument, in this case, 2. Python Data Structure Interview Questions Python Interview Questions Comments Log in or register to post comments
Comments