Q:

Print a date in a the following format using python programming

0

Print a date in a the following format

Day_name  Day_number  Month_name  Year

Given:

given_date = datetime(2020, 2, 25)

Expected output:

Tuesday 25 February 2020

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Solution:

from datetime import datetime

given_date = datetime(2020, 2, 25)
print("Given date is")
print(given_date.strftime('%A %d %B %Y'))

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now