在控制台中输入一个月份,11:30
# 返回该月份的天数
# 1 3 5 7 8 10 12 ---> 31 天
# 4 6 9 11 ---> 30 天
# 2 ---> 28 天
代码:
str1=[12,10,8,7,5,3,1 ]
str2=[11,9,6,4]
str3=[2]
month=int(input("请输入一个月份:")
if month in str1:
print("31")
elif month in str2:
print("30")
else:
print("28")