num_list = [1, 2, 3, 6, 3, 2, 4, 5, 6, 2, 4] num_list.sort(reverse=True) print(num_list[0])
강의답지
num_list = [1, 2, 3, 6, 3, 2, 4, 5, 6, 2, 4] max = 0 for num in num_list: if max < num: max = num print(max)