0 of 6 problems solved • 0%

Using the Standard Library

6 exercisesIntermediate

Python ships with a standard library of modules. Use an import to make a named tool available in your script. A module such as datetime provides objects that understand their own rules, including calendar month lengths.

from datetime import date first = date(2024, 3, 1) second = date(2024, 3, 8) print((second - first).days) # 7