Python获取时间Python获取昨天,今天,明天,本周,上周,本月,上月,本季,本年,去年时间
Python获取昨天,今天,明天,本周,上周,本月,上月,本季,本年,去年时间import datetimefrom datetime import timedelta now = datetime.datetime.now() #今天today = now #昨天yesterday = now - timedelta(days=1) #明天tomorrow = now + timedelta(days=1)<br><br>#当前季