请解释[[[0]*64 for i in range(7)] for j in range(2)]
部分以及如何编写lisp等价物。你知道吗
pieceHashes = [[[0]*64 for i in range(7)] for j in range(2)]
for color in WHITE, BLACK:
for piece in PAWN, KNIGHT, BISHOP, ROOK, QUEEN, KING:
for cord in range(64):
pieceHashes[color][piece][cord] = randint(0, maxint)
它生成一个具有64 x 7 x 2个元素的三维数组。 然后在最后一行填充数组。你知道吗
相关问题 更多 >
编程相关推荐