1️⃣ 수 정렬하기

N = int(input())
num =[]
for i in range(N):
  num.append( int(input()) )

num.sort()
for n in num:
  print(n)

2️⃣ 수 정렬하기 2

import sys

N = int(sys.stdin.readline())
num = []
for i in range(N):
  num.append(int(sys.stdin.readline().rstrip()))

for n in sorted(num):
  print(n)

https://leedakyeong.tistory.com/entry/백준-2751번-수-정렬하기-2-in-python-파이썬

https://ratsgo.github.io/data structure&algorithm/2017/10/03/mergesort/

https://ko.wikipedia.org/wiki/합병_정렬

3️⃣ 수 정렬하기 3

import sys
input = sys.stdin.readline
N = int(input())
num = [0]*10001

for _ in range(N):
  num[int(input())] += 1

for i in range(10001):
  if num[i] != 0:
    for _ in range(num[i]):
      print(i)

https://yoonsang-it.tistory.com/49

4️⃣ 통계학

import sys, statistics

N = int(sys.stdin.readline())
num = []
for i in range(N):
  num.append(int(sys.stdin.readline().rstrip()))

num.sort()

print( round(statistics.mean(num)))
print( statistics.median(num) )
list = statistics.multimode(num)
if len(list) >= 2:
  print( list[1] )
else:
  print( list[0] )
print( max(num)-min(num) )