최댓값 구하기

신유빈·2021년 8월 4일
0

강의볼 때

목록 보기
6/10
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)
profile
안녕하세요

0개의 댓글

관련 채용 정보