下面代码的输出结果为a_list = [3, 5, 7]print(a_list[0])
A: 3
B: 5
C: 7
D: 报错
A: 3
B: 5
C: 7
D: 报错
举一反三
- 以下程序的输出结果是:list = ["1","3" ,"5"]def app(x):list. append(x)app( "7" )print( list)} A: ['1','3','5'] B: ['1','3','5','7'] C: ['7'] D: "1,3,5,7"
- 以下代码的显示结果是什么? data=[[[1,2],[3,4]],[[5,6],[7,8]]] print(data[1][0][0]) A: 1 B: 2 C: 4 D: 5 E: 6
- 补全代码,使输出结果为True Truea = 1b = "2"list = [1,2,3,4,5]print(a _____ list,b ____ list)
- 若有List=[2,5,1,7],执行语句List.insert(3,9),List中的值为_______。() A: [9, 2, 5, 1, 7] B: [2, 5, 1, 9, 7] C: [2, 5, 1, 7, 9] D: [2, 5, 1, 7, 3, 9]
- 下列程序的输出是__________?publicclassTest{publicstaticvoidmain(String[]args){int[][]values={{3,4,5,1},{33,6,1,2}};intv=values[0][0];for(int[]list:values)for(intelement:list)if(v>element)v=element;System.out.print(v);}} A: 1 B: 3 C: 5 D: 6 E: 33