Q:

Python program to print today\'s year, month and day

0

In the below example – we are implementing a python program to print the current/ today's year, month and year.

Steps:

  • Import the date class from datetime module
  • Create a date object of today's date – call the today() function of date class to get the current date.
  • By using the date object – we can extract and print today's year, month and day.

All Answers

total answers (0)

Similar questions


need a help?


find thousands of online teachers now