웹서핑하면서 참고한 코드들이다.

def solution(num_list, n):
answer = []
cnt = 0
temp = []
for num in num_list:
temp.append(num)
cnt += 1
if cnt == n:
answer.append(temp)
temp = []
cnt = 0
return answer
def solution(num_list, n):
return [num_list[ix-n:ix] for ix in range(n, len(num_list)+1, n)]