題目有給一長串'January, February, March, April, May, June, July, August, September, October, November, December'
有這個就可以用字串分割.split(', ')存成list
就可以利用index 不需要在那邊用if elif ...
data = 'January, February, March, April, May, June, July, August, September, October, November, December'.split(', ')
print(data[int(input()) - 1])
題目有給一長串'January, February, March, April, May, June, July, August, September, October, November, December'
有這個就可以用字串分割.split(', ')存成list
就可以利用index 不需要在那邊用if elif ...
data = 'January, February, March, April, May, June, July, August, September, October, November, December'.split(', ')
print(data[int(input()) - 1])
更 其實可以一行解