A

Admin • 825.56K Points
Coach

Q. What does `popitem()` do in a dictionary?

  • (A) Removes all items
  • (B) Removes an arbitrary key-value pair
  • (C) Removes the first item
  • (D) Removes the last inserted key-value pair

Explanation by: Admin
In Python 3.7+, `popitem()` removes and returns the last inserted item.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.