七日派息计算
作者:互联网
1 import datetime 2 3 if __name__ == '__main__': 4 day1 = datetime.date(2020,7,13) 5 day2 = day1 + datetime.timedelta(days=1) 6 result = [] 7 for i in range(1,100): 8 if i % 7 == 0 : 9 result.append('第%d天,日期:%s,派息' % (i, day2)) 10 else: 11 result.append('第%d天,日期:%s' % (i, day2)) 12 day2 = day2 + datetime.timedelta(days=1) 13 print('\n'.join(result))七日派息计算
标签:__,day2,七日,datetime,result,计算,派息,append 来源: https://www.cnblogs.com/xiaodebing/p/13345374.html