import datetime now = datetime.datetime.now().year print(now)
Here is what the above code is Doing:
1. We import the datetime module.
2. We create a variable called now and set it equal to datetime.datetime.now().year.
3. We print the value of now.