1
单选(2分)
以下代码的输出结果是(D)。
def fun(num):
num *= 2
x = 20
fun(x)
print(x)A.10
B.报错
C.40
D.20
2
单选(2分)
Python中以只读形式打开文件的模式是(D)。
A.x
B.w
C.b
D.r
3
单选(2分)
以下代码的输出结果是(A)。
alist=['a','b','c']
blist=alist[:1:-1]
print(blist)A.['c']
B.['b', 'c']
C.['a']
D.['c', 'b']
4
单选(2分)
以下代码的输出结果是(B)。
L1 =['abc', ['123','456']]
L2 = ['1','2','3']
print(L1 > L2)A.False
B.True
C.1
D.TypeError: '>' not supported between instances of 'list' and 'str'
5
单选(2分)
以下关于容器类型说法错误