- date() is a python function which is defined in datetime module, that return the date based on the given year,month and day.
Syntax-
calendar.datetime.date(year,month,day)
program-
#import calendar module
import calendar
print("Enter year")
y=int(input())
print("Enter month")
m=int(input())
print("Enter day")
d=int(input())
print("Date is ",calendar.datetime.date(y,m,d))
Enter year
2020
Enter month
3
Enter day
5
Date is 2020-03-05