已知list_1 = [2, 5, 7, 9, 13, 16],则执行print(list_1.index(9)),得到结果是()
举一反三
- 已知list_1 = [2, 5, 7, 9, 13, 16],则执行print(list_1.index(9)),得到结果是()。 A: 0 B: 1 C: 2 D: 3
- 若有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]
- dict={'a':1, 'b':2, 'c':3} str=list(dict.keys())[list(dict.values()).index(2)] print(str) 输出结果是( ) A: a B: C: c D: 2
- 以下程序的输出结果是: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"
- 以下程序的执行结果是。 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]