📅  最后修改于: 2022-03-11 15:00:47.558000             🧑  作者: Mango
l = [1,2,4,6]
def recursive(l):
if len(l) == 0:
return [] # base case
else:
return [l.pop()] + recursive(l) # recusrive case
print recursive(l)
>[6,4,2,1]