What will be the output of the following Python program?

data = {"a": 10, "b": 20}
print(data.pop("a"))
                        

Options

  • A. a
  • B. 10
  • C. 20
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. 10

Detailed Explanation

Explanation: pop() removes the specified key and returns its associated value, which is 10.