Code:
import datetime
intDay = datetime.date(year=2023, month=4, day=4).weekday()
days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
print(days[intDay])
I want both the week and the month to be printed on one line
Code:
To be more precise you don't need to create a
listfor weekdays you can directly obtained weekday usingstrftime("%A").Code: