Python generating a list of dates between two dates

前端 未结 3 1083
栀梦
栀梦 2021-01-18 03:45

I want to generate a list of dates between two dates and store them in a list in string format. This list is useful to compare with other dates I have.

My code is g

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-18 04:12

    You'd need to turn it into a list with strings explicitly:

    print([str(d) for d in dates_bwn_twodates(sdate,edate)])
    

提交回复
热议问题