The datetime object lets us work with dates and times in Python. But the value returned when we use this object is of the datatime data type rather than a string. Here is an example that prints the current year, month, day and time to the console: from datetime

