def sum_list(items): sum_numbers = 0 for x in items: sum_numbers += x return sum_numbers print(sum_list([1,2,-8]))
本文共 193 字,大约阅读时间需要 1 分钟。
def sum_list(items): sum_numbers = 0 for x in items: sum_numbers += x return sum_numbers print(sum_list([1,2,-8]))
转载于:https://www.cnblogs.com/sea-stream/p/9971299.html