题库 题目列表 有如下Python程序段:import random &nbsp...
单选题

有如下Python程序段:

import random
    a='A','B','#','#','C','D','#']
    stk=[0]*len(a);top=-l
    for i in range(len(a)):
    op=random. randint(0,1)        # 随机生成0或1
    if op= =l and a[i]l='#":
      top+=l;stk[top]=a[i]
      a[i]='#'
    elif op= =0 and topl=-1 and a[i]= ='#':
       a[i]=stk[top];top-=l

执行该程序段后,a的值不可能的是(    

A.

['A''B''#''#''C''D''#']

B.

'#''#''#''#''#''#''#']

C.

['#''B''#''#''C''D''A']  

D.

'#''#''A''B''C''D''#']

题目信息
选择题 高考及会考
0%
正确率
0
评论
78
点击