递归逆序_python3
用递归函数和栈逆序一个栈
http://www.nowcoder.com/questionTerminal/1de82c89cc0e43e9aa6ee8243f4dbefd
90%...
def myprint(l): return l[-1] + ' ' + myprint(l[:-1]) if l else '' input() l = input().split() print(myprint(l))
用递归函数和栈逆序一个栈
http://www.nowcoder.com/questionTerminal/1de82c89cc0e43e9aa6ee8243f4dbefd
90%...
def myprint(l): return l[-1] + ' ' + myprint(l[:-1]) if l else '' input() l = input().split() print(myprint(l))
相关推荐