python运行报错,求大神解答,谢谢
程序代码:
import random list_A=[] list_B=[] list_C=[] list_D=[] dizhu=['list_A','list_B','list_C'] poker=['DA','XIAO','1','2','3','4','5','6','7','8','9','10','J','K','Q','A','1','2','3','4','5','6','7','8','9','10','J','K','Q','A','1','2','3','4','5','6','7','8','9','10','J','K','Q','A','1','2','3','4','5','6','7','8','9','10','J','K','Q','A'] D=random.choice(dizhu) print(D) random.shuffle(poker) print(poker) for i in range(17,34): list_A[i]=poker[i] for j in range(17,34): list_B[j]=poker[j] for k in range(34,51): list_C[k]=poker[k] for d in range(51,54): list_D[d]=poker[d] if D==list_A: list_A=list_A+list_D elif D==list_B: list_B=list_B+list_D elif D==list_C: list_C=list_C+list_D print(list_A) print(list_B) print(list_C) print(list_D)
[ 本帖最后由 zhu404424118 于 2015-4-7 12:29 编辑 ]