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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章