用递归的方法写一个求和函数

def sum(alist):
【用递归的方法写一个求和函数】first,*other=alist
return first+sum(other) if other else first


print ( sum(range(1,101)) )


'''
输出:5050
'''

    推荐阅读