How do we determine the number of days for a given month in python [duplicate]

问题:

This question already has answers here : 这个问题在这里已经有了答案
Closed 7 years ago . 7年前关闭。

I need to calculate the number of days for a given month in python.我需要在 python 中计算给定月份的天数。 If a user inputs Feb 2011 the program should be able to tell me that Feb 2011 has 28 days.如果用户输入 2011 年 2 月,程序应该能够告诉我 2011 年 2 月有 28 天。 Could any one tell me which library I should use to determine the length of a given month.谁能告诉我应该使用哪个图书馆来确定给定月份的长度。


解决方案:

参考一: https://en.stackoom.com/question/Kii5
参考二: https://stackoom.com/question/Kii5
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章