코드
def solution(board, moves):
bucket = []
answer = 0
for index in [m-1 for m in moves] :
column = [x[index] for x in board]
for i, doll in enumerate(column) :
if doll == 0: continue
if bucket[-1:] == [doll]:
bucket.pop()
answer += 2
else:
bucket.append(doll)
board[i][index] = 0
break
return answer