Python:20输入年份月份,生成日历

代码献上: 

# 引入日历模块
import calendar

# 输入指定年月
yy = int(input("输入年份: "))
mm = int(input("输入月份: "))

# 显示日历
print(calendar.month(yy, mm))

 运行结果:

发布了232 篇原创文章 · 获赞 504 · 访问量 17万+

猜你喜欢

转载自blog.csdn.net/weixin_44015669/article/details/105108212