Jul-24-2021, 07:23 PM
calendar.weekday
returns an int
for the weekday, calendar.day_name
is indexable using the weekday intimport calendar for day in (23, 24, 25): weekday = calendar.weekday(2021, 7, day) print(f"Day of the week in english is {calendar.day_name[weekday]}")
Output:Day of the week in english is Friday
Day of the week in english is Saturday
Day of the week in english is Sunday