백준. 11651번. 좌표 정렬하기2 파이썬 풀이
문제링크 https://www.acmicpc.net/status?from_mine=1&problem_id=11651&user_id=chmh0411
11650문제의 정렬에 람다식을 추가하여 정렬
n = int(input())
array = []
for _ in range(n):
x, y = map(int, input().split())
array.append([x,y])
array = sorted(array, key=lambda x:(x[1], x[0]))
for x, y in array:
print(x, y)