如何生成适合指定“年”的列表的文件名。我需要知道如何生成适合于 year_list 的“日历”名称。我想一次将 2000 添加到 2013 year_list,因为现在一旦我运行脚本以输出不同的年份,我就必须编辑和更改每年的数字。
year_list = [2000]
FILENAME = "calendar_2000.txt"
Run Code Online (Sandbox Code Playgroud)
我需要的是 year_list 为 2000, 2001, 2002 .. 到 2013 年,并根据 year_list 数字生成相应的输出文件。
python ×1