In: Computer Science
takes a single string d as input which represents a date
Please upvote if you are able to understand this and if there is any query do mention it in the comment section.
CODE:
from datetime import datetime#importing the datetime class from datetime module
d = input("Enter date\n")#asking input from user
date = datetime.strptime(d, '%d/%m/%y')#converting d to date which
was taken as input from user
print(date)#printing the date in the dd-mm-yy format
OUTPUT:
If this was supposed to be done in any other way or something else was required in this then please mention it in the comment section otherwise please upvote.