下面代码的输出结果是 list1=[] foriinrange(1,11): list1.append(i**2) print(list1)
A: [1,4,9,16,25,36,49,64,81,100]
B: [2,4,6,8,10,12,14,16,18,20]
C: 错误
D: ----Python:----ASuperlanguage
A: [1,4,9,16,25,36,49,64,81,100]
B: [2,4,6,8,10,12,14,16,18,20]
C: 错误
D: ----Python:----ASuperlanguage
举一反三
- 下面代码的输出结果是 list1=[] foriinrange(1,11): list1.append(i**2) print(list1) A: [1,4,9,16,25,36,49,64,81,100] B: [2,4,6,8,10,12,14,16,18,20] C: 错误 D: ----Python:----ASuperlanguage
- 下面代码的输出结果是 ls = [] for i in range(1,11): ls.append(i**2) print(ls) A: [1, 4, 9, 16, 25, 36, 49, 64, 81, 100] B: [2, 4, 6, 8, 10, 12, 14, 16, 18, 20,22] C: [1, 4, 9, 16, 25, 36, 49, 64, 81, 100,121] D: [11,22,33,44,55,66,77,88,99,1010,1111]
- 下面代码的输出结果是list1 = [i*2 for i in 'Python']print(list1) A: 系统错误 B: [2, 4, 6, 8, 10, 12] C: Python Python D: ['PP', 'yy', 'tt', 'hh', 'oo', 'nn']
- 下面代码的输出结果是()。 list1<br/>= [i*2 for i in 'Python'] print(list1) A: ['PP',<br/>'yy', 'tt', 'hh', 'oo', 'nn'] B: Python Python C: 错误 D: [2, 4, 6, 8, 10, 12]
- 下面代码的输出结果是 list1 = [] for i in range(1,11): list1.append(i**2) print(list1)