πŸ“Š Python
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
πŸ’¬ Discuss
βœ… Correct Answer: (D) Removes the last inserted key-value pair

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

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

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
47
Total Visits
πŸ“½οΈ
9 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
87%
Success Rate