1. Dictionary merge
>>> x | y
- type hint
from typing import Index, Dict
import 필요 없어짐
def hello(r: list[str]): for a in r: print(a)
3. 새로운 String Method
- removeprefix()
- removesuffix()
4. nextafter() 의 등장
math.nextafter(x,y) 로 구성되고, x → y 까지의 수 중 표현할 수 있는 다음 수를 리턴
5. 패키지 Import Error 버그 픽스
import()는 이제 ValueError 가 아닌 ImportError를 raise
6. 랜덤바이트 생성
andom.randbytes(?seed)
7. timezone error
>>> from datetime import datetime >>> from zoneinfo import ZoneInfo >>> utc = datetime.utcnow() >>> utc datetime.datetime(2020, 10, 12, 4, 24, 49, 297058) >>> kst = utc.astimezone(ZoneInfo('Asia/Seoul')) >>> kst datetime.datetime(2020, 10, 12, 4, 24, 49, 297058, tzinfo=zoneinfo.ZoneInfo(key='Asia/Seoul'))
8. gcd, lcm
>>> import math >>> math.gcd(2, 6, 8) 2 >>> math.lcm(2, 4, 6) 12

Seonglae Cho