Consider the following Python dictionary: D = {1: 'Amar', 2: 'Akbar', 3:…
PYQ EMRS TGT/PGT (ESSE) 2025
Consider the following Python dictionary:
D = {1: 'Amar', 2: 'Akbar', 3: 'Anthony'}
Which of the following statements will perform an operation on dictionary D that is most similar to D.pop(2)?
- A.
del D(2)
- B.
del D[2]
- C.
D.popitem(2)
- D.
D.remove(2)
Attempted by 955 students.
Sign up free to check your answer
Sign up freeLoading lesson…

