#25852: 試著不用if


morrisddd (MORRIS 范智傑)

學校 : 國立臺灣科技大學
編號 : 126549
來源 : [23.93.64.134]
最後登入時間 :
2023-11-23 12:57:22

寫python的可以嘗試print((條件)*(print things))

#30038: Re:試著不用if


lee2663460095@gmail.com (李Andy)

學校 : 不指定學校
編號 : 191464
來源 : [36.229.83.174]
最後登入時間 :
2022-04-24 20:03:03

寫python的可以嘗試print((條件)*(print things))


直接寫一個12生肖的list或是str,把取到的餘數-1當作該list或字串的index來print就好了