Python will do the date... «Automate the Boring Stuff with Python: Practical Programming for Total Beginners»

  • Аватар пользователя
    ska3o4nik
    25 декабря 2020

    Python will do the date arithmetic to figure out that 1,000 days after February 27, 2015, will be November 23, 2017. This is useful because when you calculate 1,000 days from a given date, you have to remember how many days are in each month and factor in leap years and other tricky details. The datetime module handles all of this for you.

    59
Python will do the date... (Цитата из книги «Automate the Boring Stuff with Python: Practical Programming for Total Beginners» Al Sweigart)