题目
题目
单项选择题

MutableMapping class provides concrete implementations for all behaviors other than the first five outlined earlier:  1._______ 2._______, 3.delitem, 4.len, and 5.iter.  2 essential methods are missing from this ADT, rest are there. Fill in the missing methods by selecting one of the choices.

选项
A.1.getitem, 2.setitem,
B.1.delitem, 2.setitem
C.1.balanceitem, 2.rotateitem,
D.1.get_heightitem, 2.priority_queue_item,
查看解析

查看解析

标准答案
Please login to view
思路分析
We start by restating the question to ensure clarity: The MutableMapping class provides concrete implementations for all behaviors other than the first five outlined earlier, which are labeled as 1. ___ and 2. ___, followed by 3. delitem, 4. len, and 5. iter. Two essential methods are missing from this Abstract Data Type (ADT); we must select the pair that fills in the blanks from the given options. Option 1: '1.getitem, 2.setitem,' This pairing suggests that the missing methods are __getitem__ and __setitem__, which are the standard methods for item access and item assignment in Python mappings. __g......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!