在Python中,列表L=["小明","男",18,178.9,[101,25]],以下( )语句不能返回101
A. L[-1][0]
B. L[4][0]
C. L[4][-2]
D. L[-1][1]
查看答案
在Python中,字典d1 = {"id" : 10, "name" : "Lili", "class" : "A01"},以下( )语句能返回” Lili”
A. d1[name]
B. d1["name"]
C. d1[1]
D. d1["Lili"]
已知x = list(range(5, 10))那么语句print(x[5:10])的输出结果为()
A. []
B. [5]
C. [0, 1, 2, 3, 4]
D. [5, 6, 7, 8, 9]
以下程序的输出结果是()counts = {'曹操': 1, '刘备': 2, '孙权': 3}ls = list(counts.items())ls.sort(key=lambda x: x[1], reverse=True)print(ls)
A. [('曹操', 1), ('孙权', 3), ('刘备', 2)]
B. [('孙权', 3), ('刘备', 2), ('曹操', 1)]
C. [('曹操', 1), ('刘备', 2), ('孙权', 3)]
D. [('刘备', 2), ('孙权', 3), ('曹操', 1)]
s1=[4,5,6]s2=s1s1[1]=0print(s2)上述语句运行结果是:
A. [4,5,6]
B. [0,5,6]
C. [4,0,6]
D. 以上都不对