10.
有如下 Python 程序段
from random import randint
x = randint(2,4)*2
a=[9,2,5, 1,3,4,8,7]
n=len(a)
for i in range(0,n- 1):
k=i
for j in range(i+1,x):
if a[k]>a[j]:
k=j
if i!=k:
a[k],a[i]=a[i],a[k]
print(a)
执行后,输出结果不可能是( )
A.
[1, 2, 3, 4, 5, 7, 8, 9]
B.
[1, 2, 3, 4, 5, 9, 8, 7]
C.
[1, 2, 5, 9, 3, 4, 8, 7]
D.
[1, 2, 3, 4, 5, 9, 7, 8]