单选题
适中
#5363
以下程序的输出结果是?( ) list = ['华东','华西','华南','华北'] list.insert(2,'华中') list.pop() print…
以下程序的输出结果是?( )
list = ['华东','华西','华南','华北']
list.insert(2,'华中')
list.pop()
print(list)
答案与解析
正确答案:C
解析
本题考查列表的插入和从列表的指定位置删除元素,2表示将元素插入至原列表索引为2的元素之前,.pop()方法无参数时默认删掉最后一个元素。