首页->Python应用师
下面代码的输出结果是( )。
a = [1, 2, 3]
for i in a[::-1]:
print(i,end=",")
(A)3,1,2
(B)2,1,3
(C)3,2,1,
(D)1,2,3
参考答案
![微考学堂](/images/gzh.png)
更多Python应用师试题
- 1已知x = [1, 2, 3],那么表达式not (set(x*100)-set(x))的值为( )。
- 2语句 print(re.match('abc', 'defg')) 输出结果为( )。
- 3已知函数定义def demo(x, y, op):return eval(str(x)+op+str(y)),那么表达式demo(3, 5, '*')的
值为( )。
- 4关于Python的数字类型,以下选项中描述错误的是( )。
- 5表达式sorted({'a':3, 'b':9, 'c':78})的值为( )。