Python实现1-100之和

def sum():
    sum = 0
    for n in range(1, 101):
        sum = sum + n
    return sum

print(sum())
原文地址:https://www.cnblogs.com/fuxinxin/p/14152577.html