alist=[1,1,2,3] b=set(alist) print(b) 上述代码的输出结果是____
{1, 2, 3}
举一反三
- alist=[1,1,2,3] b=set(alist) print(b)上述代码的输出结果是()。 A: {1, 2, 3} B: {1, 1, 2, 3} C: [1, 2, 3] D: 其余选项都不对
- 下面代码的输出结果是()。alist=[1,1,2,3]b=set(alist)print(b) A: [1,2,3] B: {1,1,2,3} C: {1,2,3} D: 都不正确
- a=[3] alist=[1,2,3,4,5] print(a in alist) 上述代码的运行结果是()
- a=[3] alist=[1,2,3,4,5] print(a in alist)上述代码的运行结果是()。 A: 1 B: True C: 0 D: False
- 执行如下代码的输出结果是( )。aList = [1,5,3,9]aList.sort()print(aList) A: aList B: [1,3,5,9] C: [9,5,3,1] D: [9531]
内容
- 0
alist=[3,4,5,7,9,12,13,15,17] blist=alist[3:7:2] print(blist) 上述代码的输出结果是()
- 1
alist=[1,2,3]blist=alist*3print(blist)上述代码的输出结果是()。
- 2
下面代码的输出结果是 a = [1, 2, 3] b = a[:] print(b) A: [] B: [3,2,1] C: 0xF0A9 D: [1, 2, 3]
- 3
下面代码的输出结果是a = [1, 2, 3]b = a[:]print(b) A: [] B: [1, 2, 3] C: [3,2,1] D: 0xF0A9
- 4
下面代码的输出结果是 a = [1, 2, 3] b = a[:] print(b) A: [] B: [3,2,1] C: 0xF0A9 D: [1, 2, 3]