我试图在 python 中获取从当前日期开始 7 天前的日期。谁能帮我?
import datetime as DT today = DT.date.today() week_ago = today - DT.timedelta(days=7)