用Python2.使用列表编写一个程序,用户输入一个月份,程序输出该月份对应的英文单词。
时间: 2024-05-21 17:11:26 浏览: 127
列表的使用方法(python)
month_list = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
month_number = input("Please enter a month number (1-12): ")
print(month_list[int(month_number)-1])
阅读全文