https://school.programmers.co.kr/learn/courses/30/lessons/133502
def solution(ingredient):
temp = []
cnt = 0
for i in ingredient:
temp.append(i)
if temp[-4:] == [1, 2, 3, 1]:
cnt+=1
del temp[-4:]
return cnt
빈 리스트를 생성해, 재료를 하나씩 넣는다. 그 리스트에서 가장 마지막의 4개 재료만을 비교하며 loop