프로그래머스 프린터
from collections import deque
def solution(priorities, location):
answer = 0
z = deque(list(zip(priorities,[i for i in range(len(priorities))])))
while z:
tmp = z.popleft()
for p in z:
if tmp[0] < p[0]:
z.append(tmp)
break
else:
answer += 1
if tmp[1] == location:
return answer