以下程序的执行结果是。 L = [1, 3, 5, 7, 9] print(L.pop(-3), end = ) print(L.remove(L[0]), end = ) print(L)
A: 5 1 [3, 7, 9]
B: 5 1 [1, 3, 7, 9]
C: 5 None [3, 7, 9]
D: 5 None [1, 3, 7, 9]
A: 5 1 [3, 7, 9]
B: 5 1 [1, 3, 7, 9]
C: 5 None [3, 7, 9]
D: 5 None [1, 3, 7, 9]
举一反三
- 以下程序的执行结果是。 L = [1, 3, 5, 7, 9] L.pop(-3) L.remove(L[0]) print(L) A: [1,3,5,7,9] B: [3,5,7,9] C: [3,7,9] D: [5,7,9]
- 以下程序的输出结果是___________。for i in range(1,11): print(i, end = " ") A: 1 2 3 4 5 6 7 8 9 B: 1 2 3 4 5 6 7 8 9 10 C: 1 2 3 4 5 D: 1 3 5 7 9
- set1 = {x for x in range(10) if x%2!=0} set1.remove(1) print(set1) 以上代码的运行结果为? A: {1, 3, 5, 7, 9} B: {1, 3, 5, 7} C: {3, 5, 7, 9} D: {3, 5, 7}
- set1 = {x for x in range(10) if x%2!=0} print(set1) 以上代码的运行结果为? A: {1, 3, 5, 7, 9} B: {1, 3, 5, 7} C: {3, 5, 7, 9} D: {3, 5, 7}
- >>>x= [10, 6, 0, 1, 7, 4, 3, 2, 8, 5, 9]>>>print(x.sort()) 语句运行结果正确的是( )。 A: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] B: [10, 6, 0, 1, 7, 4, 3, 2, 8, 5, 9] C: [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0] D: ['2', '4', '0', '6', '10', '7', '8', '3', '9', '1', '5']