Python中银行卡冻结剩余时间

import timewhile True:a="2019-07-24 17:04:00" # 冻结时间b=time.time() # 当前时间e=7*60*
import time
while True:a="2019-07-24 17:04:00" # 冻结时间b=time.time() # 当前时间e=7*60*60*24  # 冻结7天的秒数c=time.mktime(time.strptime("2019-07-24 17:04:00","%Y-%m-%d %H:%M:%S")) # 冻结时间换算出秒数d=c+e-b # 冻结时间的秒数加上7天的秒数减去当前时间day = d//(60*60*24)  # 天hour =d//(60*60)%24  # 小时minute = d//60%60    # 分钟seconds = d%60       # 秒print("\r""解冻时间还剩:%d天%d小时%d分%d秒"%(day,hour,minute,seconds),end="")time.sleep(1)  # 时间设为1秒更换