昨天
from datetime import date, timedelta yesterday = (date.today() timedelta(days=-1)).strftime("%y-%m-%d") print(yesterday)
今天
明天
from datetime import date, timedelta tomorrow = (date.today() timedelta(days= 1)).strftime("%y-%m-%d") print(tomorrow)