该weekday()
方法用于返回一周中的特定日期。
import datetime import calendar #defining function named called findweekDay def findWeekDay(date): i = datetime.datetime.strptime(date, '%d %m %Y').weekday() return (calendar.day_name[i]) date = '24 05 2019' print(findWeekDay(date))
friday