You are viewing a single comment's thread. Return to all comments →
import calendar date_input = list(map(int,input().split(' '))) weekday_number = calendar.weekday(date_input[2], date_input[0], date_input[1]) weekday_dict = {0:"Monday", 1:"Tuesday", 2:"Wednesday",3:"Thursday",4:"Friday", 5:"Saturday",6:"Sunday"} print(weekday_dict[weekday_number].upper())
Seems like cookies are disabled on this browser, please enable them to open this website
Calendar Module
You are viewing a single comment's thread. Return to all comments →
import calendar date_input = list(map(int,input().split(' '))) weekday_number = calendar.weekday(date_input[2], date_input[0], date_input[1]) weekday_dict = {0:"Monday", 1:"Tuesday", 2:"Wednesday",3:"Thursday",4:"Friday", 5:"Saturday",6:"Sunday"} print(weekday_dict[weekday_number].upper())