写一个python脚本指定公历年份和月份显示相应的日历。
你可以使用calendar模块来实现这个脚本。下面是一个示例代码:
import calendar
year = int(input("请输入公历年份:"))
month = int(input("请输入月份:"))
# 打印日历
print(calendar.month(year, month))
这个脚本会要求用户输入公历年份和月份,然后使用calendar.month()函数来打印指定年份和月份的日历。
原文地址: https://www.cveoy.top/t/topic/hHUC 著作权归作者所有。请勿转载和采集!