A: [1,3,4,5]
B: [4,1,3,5]
C: [1,3,5,4]
D: [5,4,3,1]
举一反三
- 已知x = [1, 2, 3],执行语句x.append(4)之后,x的值是什么? A: [1, 2, 3, 4] B: [4] C: [1, 2, 3] D: 4
- 求不定积分[img=115x46]17da65382f8e1b9.png[/img]; ( ) A: x - (5*log(x + 1))/4 - (3*log(x - 3)) B: (5*log(x + 1))/4 - (3*log(x - 3)) C: x - (5*log(x + 1))/4 - (3*log(x - 3))/4 D: (5*log(x + 1))/4 - (3*log(x - 3))/4
- 执行以下语句的结果:dict1={"x":1,"y":2,"z":3}dict2={"x":4,"a":5}dict1.update(dict2) A: {"x":1,"y":2,"z":3,"x":4,"a":5} B: {"x":4,"a":5,"x":1,"y":2,"z":3} C: 有重复项,结果有误! D: {"x":4,"y":2,"z":3,"a":5}
- 4-9下面代码的执行结果是( )。 a= [1,2][br][/br]a.append(3)[br][/br]a.insert(3,[4,5])[br][/br]print(a) A: [1, 2, 3, [4, 5]] B: [1, 2, 3, 4, 5] C: [1, 2, [4, 5] , 3] D: [1, 2, 3, 4, 5, 3]
- 已知 x = [1, 2, 3],那么执行语句 x[len(x)-1:] = [4, 5, 6]之后,变量x的值为_________________________________
内容
- 0
一个待排序的数据元素序列为{5, 4, 3, 2, 1},采用基本插入排序对其进行排序,以下( )是插入排序每一趟的结果。 A: 4 5 3 2 1 3 4 5 2 1 2 3 4 5 1 1 2 3 4 5 B: 5 4 3 1 2 5 4 1 2 3 5 1 2 3 4 1 2 3 4 5 C: 4 3 2 1 5 3 2 1 5 4 2 1 5 4 3 1 5 4 3 2 D: 4 5 3 2 1 2 3 4 5 1 3 4 5 2 1 1 2 3 4 5
- 1
执行y=[x for x in range(5) if x%2==1]后,y结果是( )。 A: [1, 3, 5] B: [0, 2, 4] C: [1, 3] D: [2, 4]
- 2
已知列表 x = [1, 2, 3],那么执行语句 x.insert(1, 4) 之后,x的值为___________。 A: [4, 1, 2, 3] B: [1, 4, 2, 3] C: [1, 2, 3, 4] D: [1, 1, 2, 2]
- 3
已知列表 x = [1, 2, 3, 4],那么执行语句 del x[1] 之后x的值为____________。 A: [2, 3, 4] B: [1, 3, 4] C: [] D: [1, 2, 3, 4]
- 4
假定list1=[3, 4, 5, 20, 5, 25, 1, 3], 则在执行list1.extend([34, 5])之后list1的值为( )。? [25, 20, 5, 5, 4, 3, 3, 1, 34, 5]|[1, 3, 3, 4, 5, 5, 20, 25, 34, 5]|[1, 3, 4, 5, 20, 5, 25, 3, 34, 5]|[3, 4, 5, 20, 5, 25, 1, 3, 34, 5]