A: abc
B: def
C: 2
D: d
举一反三
- 以下代码的输出结果是( )ls = [[1,2,3],’python’,[[4,5,’ABC’],6],[7,8]]print(ls[2][1]) A: ‘ABC’ B: p C: 4 D: 6
- 已知a=[[1,2,3],[2,2],[3,2,1]],则a[1][1]+a[-1][-1]结果是 A: 1 B: 2 C: 3 D: 4
- 写出下面程序的输出结果:d1 = {} d1[2] = 10 d1['2'] = 20 d2 = {} d2[2] = d1 d2['2'] = d2 print d2['2']['2']['2']['2'][2][2]
- 执行语句:print(len("abc,def,g".split(','))),则输出:________。
- 以下程序的输出结果是_______。lst=[1,2,3,4,5,'a','b']print(lst[1], lst[-2]) A: 2 b B: 2 a C: 1 b D: 1 a
内容
- 0
以下程序的输出结果是: ls=[[1,2], 'python', [[3,4,'A'],5],[0,7]] print(ls[2][1]) A: 'A' B: p C: 3 D: 5
- 1
What will be the output of the following Python code? [br][/br]print("abc DEF".capitalize()) A: abc def B: ABC DEF C: Abc def D: Abc Def
- 2
如下程序的输出结果是:L1 =[‘abc’, [‘123’,‘456’]]L2 = [‘1’,‘2’,‘3’]print(L1 >; L2) A: False B: TypeError: ‘>;’ not supported between instances of ‘list’ and ‘str’ C: 1 D: True
- 3
以下程序的输出结果是: L1 =['abc', ['123','456']] L2 = ['1','2','3'] print(L1 > L2) A: TypeError: '>' not supported between instances of 'list' and 'str' B: False C: True D: 1
- 4
以下代码的输出结果是(_____)。L1 =['abc', ['123','456']] L2 = ['1','2','3'] print(L1 > L2) A: False B: True C: TypeError: '>' not supported between instances of 'list' and 'str' D: 1