1 from datetime import datetime
2 
3 class Solution:
4     def dayOfTheWeek(self, day: int, month: int, year: int) -> str:
5         days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday","Sunday"]
6         return days[datetime(year, month, day).weekday()]

 

posted on 2019-09-11 07:19  Sempron2800+  阅读(221)  评论(0编辑  收藏  举报