下面代码的输出结果是 a=[9,6,4,5] N=len(a) for i in range(int(len(a)/2)): a[i],a[N—i一1]=a[N—i—1],a[i] print(a)

admin2019-09-02  25

问题 下面代码的输出结果是
a=[9,6,4,5]
N=len(a)
for i in range(int(len(a)/2)):
a,a[N—i一1]=a[N—i—1],a
print(a)

选项 A、[9,6,5,4]
B、[5,6,9,4]
C、[5,4,6,9]
D、[9,4,6,5]

答案C

解析
转载请注明原文地址:https://jikaoti.com/ti/OD50FFFM
0

相关试题推荐
随机试题
最新回复(0)