小编Ari*_*ers的帖子

在python中使用递归来反转列表

def revlist(lst):
    if len(lst) == 1:
        return lst
    else:
        return lst[(len(lst) - 1)
Run Code Online (Sandbox Code Playgroud)

我已经到了这一点,但我不知道接下来该做什么.我正在为我的考试练习递归.如果有人可以提供帮助,我会感激不尽.

python recursion list python-2.7 python-3.x

6
推荐指数
3
解决办法
4348
查看次数

标签 统计

list ×1

python ×1

python-2.7 ×1

python-3.x ×1

recursion ×1