apnspython
發布時間: 2022-02-17 09:20:08
⑴ python輸出結果,跪求大神
deffoo(list,num):
ifnum==1:
list.append(0)
elifnum==2:
foo(list,1)
list.append(list[-1]+1)
elifnum>2:
foo(list,num-1)
list.append(list[-1]+list[-2])
mylist=[]
foo(mylist,10)
printmylist
熱點內容