以下程序的输出结果是: 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
A: TypeError: '>' not supported between instances of 'list' and 'str'
B: False
C: True
D: 1
举一反三
- 如下程序的输出结果是: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
- 以下代码的输出结果是(_____)。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
- 以下程序的输出结果是()。L1=[1,2,3,4] L2 = L1. copy() L2.reverse() print(L1) A: 1,2,3,4 B: [4,3,2, 1] C: [1,2, 3,4] D: 4,3,2, 1
- 以下程序的输出结果是: L2 = [1,2,3,4] L3 = L2.reverse() print( L3) A: [1,2,3,] B: [3, 2, 1] C: None D: [4, 3, 2, 1]
- 以下程序的输出结果是_____________。 L1=[4,7,3,5] L2=L1 L3=L1.copy() L2.reverse() L3.sort() print(L1)