Skip to content

Up to the nth element

1. Problem

해당 문제는 여기에서 확인하실 수 있습니다.

2. Answer

def solution(num_list, n):
    # num_list의 첫 번째 원소부터 n번째 원소까지 잘라서 반환
    return num_list[:n]