L2 : 최댓값과 최솟값 Python

jhyunn·2023년 1월 12일
0

Programmers

목록 보기
17/69

L2 : 최댓값과 최솟값 Python

https://school.programmers.co.kr/learn/courses/30/lessons/12939

def solution(s):
    s = list(map(int, s.split()))
    return ' '.join([str(min(s)), str(max(s))])

문자열을 split(), map()으로 각각 숫자로 분리해준다.
그 뒤에 min, max를 구하면 된다.

profile
https://github.com/Sungjeonghyun

0개의 댓글