문제설명
제한조건 & 입출력 예
My solution
python
def solution(s):
answer = list(map(lambda x: int(x), s.split(" ")))
answer.sort()
return f'{answer[0]} {answer[-1]}'
다른 풀이
python
def solution(s):
s = list(map(int,s.split()))
return str(min(s)) + " " + str(max(s))
name = "Tom"
year = 10
1. % operator
print("%s's age is %d" %(name,year))
print("=========================")
print("%-10s's age is %10d" %(name,year))
2. f- string
print(f"{name}'s age is {year}")
print("{}'s age is {}".format(name,year))
print("{0}'s age is {1}".format(name,year))
print("{name}'s age is {age}".format(name=name,age=year))
print("=========================")
grade = 92.4
print("{0:10}" .format(grade))
print("{0:5}" .format(grade))
print("{0:<5}" .format(grade))
print("{0:>5}." .format(grade))
print("{0:*>5}" .format(grade))