Pythonic difference between two dates in years?

后端 未结 12 2489
醉酒成梦
醉酒成梦 2020-12-02 16:21

Is there a more efficient way of doing this below? I want to have the difference in years between two dates as a single scalar. Any suggestions are welcome.

         


        
12条回答
  •  借酒劲吻你
    2020-12-02 17:21

    If you mean efficient in terms of code space then no, that's about the most efficient way to do that.

提交回复
热议问题