https://school.programmers.co.kr/learn/courses/30/lessons/64061
import numpy as np
def solution(board, moves):
board = np.array(board).T.tolist() # numpy의 전치를 활용하면 더 직관적
cnt = 0
temp = []
for i in moves:
if board[i-1] != [0]*len(board[i-1]): # 해당 열이 모두 공백이 아닐 때만 loop
while 1: # 앞서 있는 0이 모두 제거되도록 함
t = board[i-1][0]
del board[i-1][0]
if t != 0:
break
temp.append(t)
if temp[-2:] == [temp[-1]]*2: # 최근 2칸이 마지막1칸x2와 같을 경우 cnt+=2
del temp[-2:]
cnt += 2
return cnt